From 2c4583ef869757a99a04eba93bfeafa81c9d395b Mon Sep 17 00:00:00 2001 From: cloudpdf-sdk-bot Date: Sun, 25 Oct 2026 17:30:38 +0000 Subject: [PATCH] chore: generate CloudPDF Java SDK 3.0.0-alpha.16 --- .fern/metadata.json | 4 +- build.gradle | 4 +- cloudpdf-generation.json | 8 +- reference.md | 707 +++++------ src/main/java/api/core/ClientOptions.java | 2 +- .../java/api/errors/ContentTooLargeError.java | 9 +- .../api/resources/doc/AsyncDocClient.java | 20 +- .../api/resources/doc/AsyncRawDocClient.java | 8 +- .../java/api/resources/doc/DocClient.java | 20 +- .../java/api/resources/doc/RawDocClient.java | 8 +- .../doc/annotations/AnnotationsClient.java | 43 + .../annotations/AsyncAnnotationsClient.java | 43 + .../AsyncRawAnnotationsClient.java | 140 +++ .../doc/annotations/RawAnnotationsClient.java | 119 ++ .../requests/ReadFileAnnotationsRequest.java} | 91 +- .../attachments/AsyncAttachmentsClient.java | 98 ++ .../AsyncRawAttachmentsClient.java | 269 +++++ .../doc/attachments/AttachmentsClient.java | 95 ++ .../doc/attachments/RawAttachmentsClient.java | 227 ++++ .../requests/DownloadAttachmentsRequest.java} | 91 +- .../requests/ListAttachmentsRequest.java} | 52 +- .../doc/outline/AsyncOutlineClient.java | 45 + .../doc/outline/AsyncRawOutlineClient.java | 127 ++ .../resources/doc/outline/OutlineClient.java | 44 + .../doc/outline/RawOutlineClient.java | 106 ++ .../outline/requests/GetOutlineRequest.java | 108 ++ .../resources/doc/pages/AsyncPagesClient.java | 155 +-- .../doc/pages/AsyncRawPagesClient.java | 1034 ++--------------- .../api/resources/doc/pages/PagesClient.java | 146 +-- .../resources/doc/pages/RawPagesClient.java | 852 +------------- .../requests/DocPagesReorderRequest.java | 254 ---- .../requests/InsertBlankPagesRequest.java | 177 --- .../api/types/AnnotationFileAttachment.java | 22 +- src/main/java/api/types/Attachment.java | 511 ++++++++ ...PagesItem.java => AttachmentFileBase.java} | 98 +- ...hmentFile.java => AttachmentFileInfo.java} | 20 +- src/main/java/api/types/AttachmentList.java | 116 ++ .../api/types/AttachmentMutationMeta.java | 290 +++++ ...ItemTargetPage.java => AttachmentRef.java} | 76 +- .../java/api/types/AttachmentRefKind.java | 73 ++ src/main/java/api/types/CacheDelta.java | 32 + src/main/java/api/types/ChangeItem.java | 814 ++++++++++++- ....java => ChangeItemAttachmentsCreate.java} | 64 +- .../types/ChangeItemAttachmentsDelete.java | 118 ++ ...java => ChangeItemAttachmentsRestore.java} | 64 +- .../api/types/ChangeItemOutlineCreate.java | 163 +++ .../api/types/ChangeItemOutlineDelete.java | 118 ++ .../java/api/types/ChangeItemOutlineMove.java | 163 +++ .../api/types/ChangeItemOutlineRestore.java | 188 +++ .../api/types/ChangeItemOutlineUpdate.java | 175 +++ ...sponse.java => ChangeItemPagesDelete.java} | 32 +- ....java => ChangeItemPagesDeleteLayout.java} | 60 +- ...eItemPagesDeleteLayoutNamedPagesItem.java} | 34 +- ...agesDeleteLayoutNamedPagesItemTarget.java} | 58 +- ...teLayoutNamedPagesItemTargetDangling.java} | 14 +- ...DeleteLayoutNamedPagesItemTargetPage.java} | 22 +- ...teLayoutNamedPagesItemTargetTemplate.java} | 22 +- ...ChangeItemPagesDeleteLayoutPagesItem.java} | 80 +- ...eItemPagesDeleteLayoutPagesItemBoxes.java} | 83 +- ...emPagesDeleteLayoutPagesItemBoxesArt.java} | 22 +- ...PagesDeleteLayoutPagesItemBoxesBleed.java} | 22 +- ...mPagesDeleteLayoutPagesItemBoxesCrop.java} | 22 +- ...PagesDeleteLayoutPagesItemBoxesMedia.java} | 22 +- ...mPagesDeleteLayoutPagesItemBoxesTrim.java} | 22 +- ...PagesDeleteLayoutPagesItemPdfCropBox.java} | 23 +- ...geItemPagesDeleteLayoutPagesItemSize.java} | 22 +- ...emPagesDeleteLayoutPagesItemTabOrder.java} | 32 +- ...sponse.java => ChangeItemPagesInsert.java} | 32 +- ...e.java => ChangeItemPagesInsertBlank.java} | 32 +- ... => ChangeItemPagesInsertBlankLayout.java} | 60 +- ...PagesInsertBlankLayoutNamedPagesItem.java} | 34 +- ...nsertBlankLayoutNamedPagesItemTarget.java} | 58 +- ...nkLayoutNamedPagesItemTargetDangling.java} | 14 +- ...tBlankLayoutNamedPagesItemTargetPage.java} | 22 +- ...nkLayoutNamedPagesItemTargetTemplate.java} | 22 +- ...eItemPagesInsertBlankLayoutPagesItem.java} | 80 +- ...PagesInsertBlankLayoutPagesItemBoxes.java} | 82 +- ...esInsertBlankLayoutPagesItemBoxesArt.java} | 22 +- ...InsertBlankLayoutPagesItemBoxesBleed.java} | 22 +- ...sInsertBlankLayoutPagesItemBoxesCrop.java} | 22 +- ...InsertBlankLayoutPagesItemBoxesMedia.java} | 22 +- ...sInsertBlankLayoutPagesItemBoxesTrim.java} | 22 +- ...InsertBlankLayoutPagesItemPdfCropBox.java} | 22 +- ...mPagesInsertBlankLayoutPagesItemSize.java} | 22 +- ...esInsertBlankLayoutPagesItemTabOrder.java} | 32 +- ....java => ChangeItemPagesInsertLayout.java} | 60 +- ...eItemPagesInsertLayoutNamedPagesItem.java} | 34 +- ...agesInsertLayoutNamedPagesItemTarget.java} | 58 +- ...rtLayoutNamedPagesItemTargetDangling.java} | 14 +- ...InsertLayoutNamedPagesItemTargetPage.java} | 22 +- ...rtLayoutNamedPagesItemTargetTemplate.java} | 22 +- ...ChangeItemPagesInsertLayoutPagesItem.java} | 80 +- ...eItemPagesInsertLayoutPagesItemBoxes.java} | 83 +- ...temPagesInsertLayoutPagesItemBoxesArt.java | 185 +++ ...mPagesInsertLayoutPagesItemBoxesBleed.java | 185 +++ ...emPagesInsertLayoutPagesItemBoxesCrop.java | 185 +++ ...mPagesInsertLayoutPagesItemBoxesMedia.java | 185 +++ ...emPagesInsertLayoutPagesItemBoxesTrim.java | 185 +++ ...PagesInsertLayoutPagesItemPdfCropBox.java} | 23 +- ...geItemPagesInsertLayoutPagesItemSize.java} | 22 +- ...emPagesInsertLayoutPagesItemTabOrder.java} | 32 +- .../api/types/ChangeItemPagesReorder.java | 188 +++ ...java => ChangeItemPagesReorderLayout.java} | 60 +- ...eItemPagesReorderLayoutNamedPagesItem.java | 144 +++ ...agesReorderLayoutNamedPagesItemTarget.java | 286 +++++ ...erLayoutNamedPagesItemTargetDangling.java} | 14 +- ...eorderLayoutNamedPagesItemTargetPage.java} | 22 +- ...erLayoutNamedPagesItemTargetTemplate.java} | 22 +- ...ChangeItemPagesReorderLayoutPagesItem.java | 435 +++++++ ...ItemPagesReorderLayoutPagesItemBoxes.java} | 83 +- ...emPagesReorderLayoutPagesItemBoxesArt.java | 185 +++ ...PagesReorderLayoutPagesItemBoxesBleed.java | 185 +++ ...mPagesReorderLayoutPagesItemBoxesCrop.java | 185 +++ ...PagesReorderLayoutPagesItemBoxesMedia.java | 185 +++ ...mPagesReorderLayoutPagesItemBoxesTrim.java | 185 +++ ...agesReorderLayoutPagesItemPdfCropBox.java} | 23 +- ...geItemPagesReorderLayoutPagesItemSize.java | 141 +++ ...mPagesReorderLayoutPagesItemTabOrder.java} | 32 +- .../api/types/ChangeItemPagesRestore.java | 188 +++ .../types/ChangeItemPagesRestoreLayout.java | 206 ++++ ...eItemPagesRestoreLayoutNamedPagesItem.java | 144 +++ ...gesRestoreLayoutNamedPagesItemTarget.java} | 58 +- ...oreLayoutNamedPagesItemTargetDangling.java | 69 ++ ...RestoreLayoutNamedPagesItemTargetPage.java | 120 ++ ...oreLayoutNamedPagesItemTargetTemplate.java | 119 ++ ...ChangeItemPagesRestoreLayoutPagesItem.java | 435 +++++++ ...eItemPagesRestoreLayoutPagesItemBoxes.java | 217 ++++ ...emPagesRestoreLayoutPagesItemBoxesArt.java | 185 +++ ...PagesRestoreLayoutPagesItemBoxesBleed.java | 185 +++ ...mPagesRestoreLayoutPagesItemBoxesCrop.java | 185 +++ ...PagesRestoreLayoutPagesItemBoxesMedia.java | 185 +++ ...mPagesRestoreLayoutPagesItemBoxesTrim.java | 185 +++ ...PagesRestoreLayoutPagesItemPdfCropBox.java | 185 +++ ...geItemPagesRestoreLayoutPagesItemSize.java | 141 +++ ...emPagesRestoreLayoutPagesItemTabOrder.java | 119 ++ .../java/api/types/ChangeItemPagesRotate.java | 214 ++++ .../types/ChangeItemPagesRotateLayout.java | 206 ++++ ...eItemPagesRotateLayoutNamedPagesItem.java} | 34 +- ...PagesRotateLayoutNamedPagesItemTarget.java | 286 +++++ ...ateLayoutNamedPagesItemTargetDangling.java | 69 ++ ...sRotateLayoutNamedPagesItemTargetPage.java | 120 ++ ...ateLayoutNamedPagesItemTargetTemplate.java | 119 ++ ...ChangeItemPagesRotateLayoutPagesItem.java} | 80 +- ...geItemPagesRotateLayoutPagesItemBoxes.java | 217 ++++ ...temPagesRotateLayoutPagesItemBoxesArt.java | 185 +++ ...mPagesRotateLayoutPagesItemBoxesBleed.java | 185 +++ ...emPagesRotateLayoutPagesItemBoxesCrop.java | 185 +++ ...mPagesRotateLayoutPagesItemBoxesMedia.java | 185 +++ ...emPagesRotateLayoutPagesItemBoxesTrim.java | 185 +++ ...mPagesRotateLayoutPagesItemPdfCropBox.java | 185 +++ ...geItemPagesRotateLayoutPagesItemSize.java} | 22 +- ...temPagesRotateLayoutPagesItemTabOrder.java | 119 ++ .../java/api/types/ChangeItemSkippedOp.java | 273 ++++- src/main/java/api/types/ChangeOp.java | 640 +++++++++- .../api/types/ChangeOpAttachmentsCreate.java | 143 +++ .../ChangeOpAttachmentsCreateResources.java | 119 ++ .../api/types/ChangeOpAttachmentsDelete.java | 118 ++ .../java/api/types/ChangeOpOutlineCreate.java | 238 ++++ ...emSize.java => ChangeOpOutlineDelete.java} | 92 +- .../java/api/types/ChangeOpOutlineMove.java | 221 ++++ .../java/api/types/ChangeOpOutlineUpdate.java | 174 +++ .../java/api/types/ChangeOpPagesDelete.java | 116 ++ .../java/api/types/ChangeOpPagesInsert.java | 151 +++ .../api/types/ChangeOpPagesInsertBlank.java | 181 +++ .../types/ChangeOpPagesInsertBlankSpec.java | 149 +++ .../ChangeOpPagesInsertBlankSpecSize.java | 139 +++ .../types/ChangeOpPagesInsertResources.java | 118 ++ .../java/api/types/ChangeOpPagesReorder.java | 162 +++ .../java/api/types/ChangeOpPagesRotate.java | 161 +++ .../api/types/DocManifest200Response.java | 32 + .../types/DocManifest200ResponseScopes.java | 42 +- .../DocManifest200ResponseScopesOutline.java | 86 ++ ...e200ResponseLayoutPagesItemBoxesBleed.java | 185 --- ...e200ResponseLayoutPagesItemBoxesMedia.java | 185 --- ...t200ResponseLayoutPagesItemBoxesBleed.java | 185 --- ...rt200ResponseLayoutPagesItemBoxesCrop.java | 185 --- ...t200ResponseLayoutPagesItemBoxesMedia.java | 185 --- ...rt200ResponseLayoutPagesItemBoxesTrim.java | 185 --- .../DocPagesInsertBlank200ResponseLayout.java | 207 ---- ...200ResponseLayoutNamedPagesItemTarget.java | 287 ----- ...nseLayoutNamedPagesItemTargetDangling.java | 69 -- ...InsertBlank200ResponseLayoutPagesItem.java | 435 ------- ...tBlank200ResponseLayoutPagesItemBoxes.java | 218 ---- ...ank200ResponseLayoutPagesItemBoxesArt.java | 185 --- ...k200ResponseLayoutPagesItemBoxesBleed.java | 186 --- ...nk200ResponseLayoutPagesItemBoxesCrop.java | 186 --- ...k200ResponseLayoutPagesItemBoxesMedia.java | 186 --- ...nk200ResponseLayoutPagesItemBoxesTrim.java | 186 --- ...k200ResponseLayoutPagesItemPdfCropBox.java | 186 --- ...ank200ResponseLayoutPagesItemTabOrder.java | 119 -- ...e200ResponseLayoutPagesItemBoxesBleed.java | 185 --- ...te200ResponseLayoutPagesItemBoxesCrop.java | 185 --- ...e200ResponseLayoutPagesItemBoxesMedia.java | 185 --- ...te200ResponseLayoutPagesItemBoxesTrim.java | 185 --- src/main/java/api/types/DocumentOutline.java | 161 +++ src/main/java/api/types/OutlineItem.java | 442 +++++++ src/main/java/api/types/OutlineItemDraft.java | 291 +++++ src/main/java/api/types/OutlineItemPatch.java | 270 +++++ ...argetTemplate.java => OutlineItemRef.java} | 56 +- .../java/api/types/OutlineItemRefKind.java | 73 ++ .../java/api/types/OutlineMutationMeta.java | 290 +++++ src/main/java/api/types/OutlineOrder.java | 163 +++ src/main/java/api/types/OutlinePosition.java | 95 ++ .../java/api/types/OutlinePositionAfter.java | 128 ++ .../java/api/types/OutlinePositionZero.java | 83 ++ 205 files changed, 19648 insertions(+), 8756 deletions(-) rename src/main/java/api/resources/doc/{pages/requests/RotatePagesRequest.java => annotations/requests/ReadFileAnnotationsRequest.java} (50%) create mode 100644 src/main/java/api/resources/doc/attachments/AsyncAttachmentsClient.java create mode 100644 src/main/java/api/resources/doc/attachments/AsyncRawAttachmentsClient.java create mode 100644 src/main/java/api/resources/doc/attachments/AttachmentsClient.java create mode 100644 src/main/java/api/resources/doc/attachments/RawAttachmentsClient.java rename src/main/java/api/resources/doc/{pages/requests/DeletePagesRequest.java => attachments/requests/DownloadAttachmentsRequest.java} (51%) rename src/main/java/api/resources/doc/{pages/requests/InsertPagesRequest.java => attachments/requests/ListAttachmentsRequest.java} (61%) create mode 100644 src/main/java/api/resources/doc/outline/AsyncOutlineClient.java create mode 100644 src/main/java/api/resources/doc/outline/AsyncRawOutlineClient.java create mode 100644 src/main/java/api/resources/doc/outline/OutlineClient.java create mode 100644 src/main/java/api/resources/doc/outline/RawOutlineClient.java create mode 100644 src/main/java/api/resources/doc/outline/requests/GetOutlineRequest.java delete mode 100644 src/main/java/api/resources/doc/pages/requests/DocPagesReorderRequest.java delete mode 100644 src/main/java/api/resources/doc/pages/requests/InsertBlankPagesRequest.java create mode 100644 src/main/java/api/types/Attachment.java rename src/main/java/api/types/{DocPagesInsertBlank200ResponseLayoutNamedPagesItem.java => AttachmentFileBase.java} (51%) rename src/main/java/api/types/{AnnotationFileAttachmentFile.java => AttachmentFileInfo.java} (95%) create mode 100644 src/main/java/api/types/AttachmentList.java create mode 100644 src/main/java/api/types/AttachmentMutationMeta.java rename src/main/java/api/types/{DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage.java => AttachmentRef.java} (56%) create mode 100644 src/main/java/api/types/AttachmentRefKind.java rename src/main/java/api/types/{DocPagesRotate200Response.java => ChangeItemAttachmentsCreate.java} (58%) create mode 100644 src/main/java/api/types/ChangeItemAttachmentsDelete.java rename src/main/java/api/types/{DocPagesDelete200Response.java => ChangeItemAttachmentsRestore.java} (57%) create mode 100644 src/main/java/api/types/ChangeItemOutlineCreate.java create mode 100644 src/main/java/api/types/ChangeItemOutlineDelete.java create mode 100644 src/main/java/api/types/ChangeItemOutlineMove.java create mode 100644 src/main/java/api/types/ChangeItemOutlineRestore.java create mode 100644 src/main/java/api/types/ChangeItemOutlineUpdate.java rename src/main/java/api/types/{DocPagesReorder200Response.java => ChangeItemPagesDelete.java} (81%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayout.java => ChangeItemPagesDeleteLayout.java} (64%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItem.java => ChangeItemPagesDeleteLayoutNamedPagesItem.java} (71%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTarget.java => ChangeItemPagesDeleteLayoutNamedPagesItemTarget.java} (71%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling.java => ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling.java} (71%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage.java => ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage.java} (75%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate.java => ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate.java} (74%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItem.java => ChangeItemPagesDeleteLayoutPagesItem.java} (76%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItemBoxes.java => ChangeItemPagesDeleteLayoutPagesItemBoxes.java} (57%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemBoxesArt.java => ChangeItemPagesDeleteLayoutPagesItemBoxesArt.java} (82%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItemBoxesArt.java => ChangeItemPagesDeleteLayoutPagesItemBoxesBleed.java} (82%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItemBoxesArt.java => ChangeItemPagesDeleteLayoutPagesItemBoxesCrop.java} (82%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemBoxesTrim.java => ChangeItemPagesDeleteLayoutPagesItemBoxesMedia.java} (82%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemBoxesCrop.java => ChangeItemPagesDeleteLayoutPagesItemBoxesTrim.java} (82%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemPdfCropBox.java => ChangeItemPagesDeleteLayoutPagesItemPdfCropBox.java} (82%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItemSize.java => ChangeItemPagesDeleteLayoutPagesItemSize.java} (80%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItemTabOrder.java => ChangeItemPagesDeleteLayoutPagesItemTabOrder.java} (59%) rename src/main/java/api/types/{DocPagesInsert200Response.java => ChangeItemPagesInsert.java} (82%) rename src/main/java/api/types/{DocPagesInsertBlank200Response.java => ChangeItemPagesInsertBlank.java} (81%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayout.java => ChangeItemPagesInsertBlankLayout.java} (69%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItem.java => ChangeItemPagesInsertBlankLayoutNamedPagesItem.java} (76%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTarget.java => ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.java} (80%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling.java => ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling.java} (81%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage.java => ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage.java} (82%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate.java => ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate.java} (82%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItem.java => ChangeItemPagesInsertBlankLayoutPagesItem.java} (79%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxes.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxes.java} (63%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxesArt.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxesBleed.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxesCrop.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxesMedia.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemBoxesTrim.java => ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemPdfCropBox.java => ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox.java} (86%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemSize.java => ChangeItemPagesInsertBlankLayoutPagesItemSize.java} (83%) rename src/main/java/api/types/{DocPagesReorder200ResponseLayoutPagesItemTabOrder.java => ChangeItemPagesInsertBlankLayoutPagesItemTabOrder.java} (69%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayout.java => ChangeItemPagesInsertLayout.java} (64%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItem.java => ChangeItemPagesInsertLayoutNamedPagesItem.java} (71%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTarget.java => ChangeItemPagesInsertLayoutNamedPagesItemTarget.java} (71%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling.java => ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling.java} (71%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage.java => ChangeItemPagesInsertLayoutNamedPagesItemTargetPage.java} (75%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate.java => ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate.java} (74%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItem.java => ChangeItemPagesInsertLayoutPagesItem.java} (76%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemBoxes.java => ChangeItemPagesInsertLayoutPagesItemBoxes.java} (57%) create mode 100644 src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesArt.java create mode 100644 src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesBleed.java create mode 100644 src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesCrop.java create mode 100644 src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesMedia.java create mode 100644 src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesTrim.java rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItemPdfCropBox.java => ChangeItemPagesInsertLayoutPagesItemPdfCropBox.java} (82%) rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItemSize.java => ChangeItemPagesInsertLayoutPagesItemSize.java} (80%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemTabOrder.java => ChangeItemPagesInsertLayoutPagesItemTabOrder.java} (59%) create mode 100644 src/main/java/api/types/ChangeItemPagesReorder.java rename src/main/java/api/types/{DocPagesInsert200ResponseLayout.java => ChangeItemPagesReorderLayout.java} (64%) create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItem.java create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.java rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling.java => ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling.java} (71%) rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage.java => ChangeItemPagesReorderLayoutNamedPagesItemTargetPage.java} (75%) rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate.java => ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate.java} (74%) create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItem.java rename src/main/java/api/types/{DocPagesInsert200ResponseLayoutPagesItemBoxes.java => ChangeItemPagesReorderLayoutPagesItemBoxes.java} (57%) create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesArt.java create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesBleed.java create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesCrop.java create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesMedia.java create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesTrim.java rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItemPdfCropBox.java => ChangeItemPagesReorderLayoutPagesItemPdfCropBox.java} (82%) create mode 100644 src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemSize.java rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutPagesItemTabOrder.java => ChangeItemPagesReorderLayoutPagesItemTabOrder.java} (59%) create mode 100644 src/main/java/api/types/ChangeItemPagesRestore.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayout.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItem.java rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTarget.java => ChangeItemPagesRestoreLayoutNamedPagesItemTarget.java} (72%) create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItem.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxes.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesArt.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesBleed.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesCrop.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesMedia.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesTrim.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemPdfCropBox.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemSize.java create mode 100644 src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemTabOrder.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotate.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayout.java rename src/main/java/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItem.java => ChangeItemPagesRotateLayoutNamedPagesItem.java} (71%) create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetPage.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate.java rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItem.java => ChangeItemPagesRotateLayoutPagesItem.java} (76%) create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxes.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesArt.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesBleed.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesCrop.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesMedia.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesTrim.java create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemPdfCropBox.java rename src/main/java/api/types/{DocPagesDelete200ResponseLayoutPagesItemSize.java => ChangeItemPagesRotateLayoutPagesItemSize.java} (80%) create mode 100644 src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemTabOrder.java create mode 100644 src/main/java/api/types/ChangeOpAttachmentsCreate.java create mode 100644 src/main/java/api/types/ChangeOpAttachmentsCreateResources.java create mode 100644 src/main/java/api/types/ChangeOpAttachmentsDelete.java create mode 100644 src/main/java/api/types/ChangeOpOutlineCreate.java rename src/main/java/api/types/{DocPagesInsertBlank200ResponseLayoutPagesItemSize.java => ChangeOpOutlineDelete.java} (50%) create mode 100644 src/main/java/api/types/ChangeOpOutlineMove.java create mode 100644 src/main/java/api/types/ChangeOpOutlineUpdate.java create mode 100644 src/main/java/api/types/ChangeOpPagesDelete.java create mode 100644 src/main/java/api/types/ChangeOpPagesInsert.java create mode 100644 src/main/java/api/types/ChangeOpPagesInsertBlank.java create mode 100644 src/main/java/api/types/ChangeOpPagesInsertBlankSpec.java create mode 100644 src/main/java/api/types/ChangeOpPagesInsertBlankSpecSize.java create mode 100644 src/main/java/api/types/ChangeOpPagesInsertResources.java create mode 100644 src/main/java/api/types/ChangeOpPagesReorder.java create mode 100644 src/main/java/api/types/ChangeOpPagesRotate.java create mode 100644 src/main/java/api/types/DocManifest200ResponseScopesOutline.java delete mode 100644 src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesBleed.java delete mode 100644 src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesMedia.java delete mode 100644 src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesBleed.java delete mode 100644 src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesCrop.java delete mode 100644 src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesMedia.java delete mode 100644 src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesTrim.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayout.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItem.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxes.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox.java delete mode 100644 src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder.java delete mode 100644 src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesBleed.java delete mode 100644 src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesCrop.java delete mode 100644 src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesMedia.java delete mode 100644 src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesTrim.java create mode 100644 src/main/java/api/types/DocumentOutline.java create mode 100644 src/main/java/api/types/OutlineItem.java create mode 100644 src/main/java/api/types/OutlineItemDraft.java create mode 100644 src/main/java/api/types/OutlineItemPatch.java rename src/main/java/api/types/{DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate.java => OutlineItemRef.java} (64%) create mode 100644 src/main/java/api/types/OutlineItemRefKind.java create mode 100644 src/main/java/api/types/OutlineMutationMeta.java create mode 100644 src/main/java/api/types/OutlineOrder.java create mode 100644 src/main/java/api/types/OutlinePosition.java create mode 100644 src/main/java/api/types/OutlinePositionAfter.java create mode 100644 src/main/java/api/types/OutlinePositionZero.java diff --git a/.fern/metadata.json b/.fern/metadata.json index a960126..08dbb3c 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,9 +10,9 @@ "base-exception-class-name": "CloudPDFException", "base-api-exception-class-name": "CloudPDFApiException" }, - "originGitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90", + "originGitCommit": "7ded7de29f4cc0dc9da18042fca6afd5c9557bfc", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0-alpha.15", + "requestedVersion": "3.0.0-alpha.16", "ciProvider": "github" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index bc86627..24ad33d 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ java { group = 'com.cloudpdf' -version = '3.0.0-alpha.15' +version = '3.0.0-alpha.16' jar { dependsOn(":generatePomFileForMavenPublication") @@ -73,7 +73,7 @@ publishing { maven(MavenPublication) { groupId = 'com.cloudpdf' artifactId = 'sdk' - version = '3.0.0-alpha.15' + version = '3.0.0-alpha.16' from components.java pom { name = 'CloudPDF' diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index f11139e..1c1092b 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "java", - "canonicalVersion": "3.0.0-next.15", - "sdkVersion": "3.0.0-alpha.15", + "canonicalVersion": "3.0.0-next.16", + "sdkVersion": "3.0.0-alpha.16", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "9d70deca638cc7a80b0e670ec47fc45710d6603eb8f493d5fac95a38d7e5f8b3", - "gitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90", + "openapiSha256": "06543c26918bd79d426bf242c5a3091cdb7d298d3ac3296addabee2be80edb15", + "gitCommit": "7ded7de29f4cc0dc9da18042fca6afd5c9557bfc", "gitCommitIsDirty": false }, "fern": { diff --git a/reference.md b/reference.md index 93e53a8..3f68c26 100644 --- a/reference.md +++ b/reference.md @@ -91,7 +91,7 @@ client.doc().head(
-Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { : '' }`, and each file as the part `resource:`. At most 64 changes per request and 512 ops per change. +Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`, outline `doc.outline.modify`, pages `doc.pages.assemble`, embedded files `doc.attachments.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { : '' }`, and each file as the part `resource:`. At most 64 changes per request and 512 ops per change.
@@ -2642,6 +2642,100 @@ client.doc().annotations().readAppearance( + + + + +
client.doc.annotations.readFile(docId, layerName, pageKey, annotKey) -> InputStream +
+
+ +#### 📝 Description + +
+
+ +
+
+ +A file that decodes past the server's limit is refused (PayloadTooLarge). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.doc().annotations().readFile( + "docId", + "layerName", + "pageKey", + "annotKey", + ReadFileAnnotationsRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**docId:** `String` + +
+
+ +
+
+ +**layerName:** `String` + +
+
+ +
+
+ +**pageKey:** `String` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + +
+
+ +
+
+ +**annotKey:** `String` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + +
+
+ +
+
+ +**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. + +
+
+
+
+ +
@@ -2935,6 +3029,168 @@ client.doc().annotations().reorder( + + + + +## Doc Attachments +
client.doc.attachments.download(docId, layerName, fileKey) -> InputStream +
+
+ +#### 📝 Description + +
+
+ +
+
+ +A file that decodes past the server's limit is refused (PayloadTooLarge). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.doc().attachments().download( + "docId", + "layerName", + "fileKey", + DownloadAttachmentsRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**docId:** `String` + +
+
+ +
+
+ +**layerName:** `String` + +
+
+ +
+
+ +**fileKey:** `String` — The embedded file's name-tree key (its `ref.key`), token-text encoded, as `fieldKey` is. + +
+
+ +
+
+ +**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. + +
+
+
+
+ + +
+
+
+ +
client.doc.attachments.list(docId, layerName) -> AttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +A file-attachment annotation's file is listed with the annotation; read its bytes with `doc.annotations.readFile`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.doc().attachments().list( + "docId", + "layerName", + ListAttachmentsRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**docId:** `String` + +
+
+ +
+
+ +**layerName:** `String` + +
+
+ +
+
+ +**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. + +
+
+
+
+ +
@@ -3638,8 +3894,8 @@ client.doc().metadata().get( -## Doc Pages -
client.doc.pages.setScale(docId, layerName, pageKey, request) -> DocPagesSetScale200Response +## Doc Outline +
client.doc.outline.get(docId, layerName) -> DocumentOutline
@@ -3652,11 +3908,10 @@ client.doc().metadata().get(
```java -client.doc().pages().setScale( +client.doc().outline().get( "docId", "layerName", - "pageKey", - DocPagesSetScaleRequest + GetOutlineRequest .builder() .build() ); @@ -3690,43 +3945,20 @@ client.doc().pages().setScale(
-**pageKey:** `String` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+
+
-
-
-**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. -
+
-
-
- -**idempotencyKey:** `Optional` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - -
-
- -
-
- -**measure:** `Optional` - -
-
- - - - - - -
- -
client.doc.pages.viewports(docId, layerName, pageKey) -> DocPagesViewports200Response +## Doc Pages +
client.doc.pages.setScale(docId, layerName, pageKey, request) -> DocPagesSetScale200Response
@@ -3739,11 +3971,11 @@ client.doc().pages().setScale(
```java -client.doc().pages().viewports( +client.doc().pages().setScale( "docId", "layerName", "pageKey", - ViewportsPagesRequest + DocPagesSetScaleRequest .builder() .build() ); @@ -3787,73 +4019,6 @@ client.doc().pages().viewports( **documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. -
-
- - - - - - -
- -
client.doc.pages.delete(docId, layerName, request) -> DocPagesDelete200Response -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.doc().pages().delete( - "docId", - "layerName", - DeletePagesRequest - .builder() - .body( - new HashMap() {{ - put("key", "value"); - }} - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**docId:** `String` - -
-
- -
-
- -**layerName:** `String` - -
-
- -
-
- -**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. -
@@ -3868,7 +4033,7 @@ client.doc().pages().delete(
-**request:** `Map` +**measure:** `Optional`
@@ -3880,24 +4045,10 @@ client.doc().pages().delete(
-
client.doc.pages.extract(docId, layerName, request) -> InputStream -
-
- -#### 📝 Description - -
-
- +
client.doc.pages.viewports(docId, layerName, pageKey) -> DocPagesViewports200Response
-A read, not a mutation: the source document is untouched and no event is published. Body is `{"pages": PageRef[]}`; the response body is the new PDF. -
-
-
-
- #### 🔌 Usage
@@ -3907,18 +4058,12 @@ A read, not a mutation: the source document is untouched and no event is publish
```java -client.doc().pages().extract( +client.doc().pages().viewports( "docId", "layerName", - ExtractPagesRequest + "pageKey", + ViewportsPagesRequest .builder() - .body( - new HashMap() {{ - put("string", new - HashMap() {{put("key", "value"); - }}); - }} - ) .build() ); ``` @@ -3951,74 +4096,7 @@ client.doc().pages().extract(
-**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -
client.doc.pages.flatten(docId, layerName, request) -> DocPagesFlatten200Response -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.doc().pages().flatten( - "docId", - "layerName", - FlattenPagesRequest - .builder() - .body( - new HashMap() {{ - put("key", "value"); - }} - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**docId:** `String` - -
-
- -
-
- -**layerName:** `String` +**pageKey:** `String` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`.
@@ -4028,22 +4106,6 @@ client.doc().pages().flatten( **documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. -
-
- -
-
- -**idempotencyKey:** `Optional` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - -
-
- -
-
- -**request:** `Map` -
@@ -4054,7 +4116,7 @@ client.doc().pages().flatten(
-
client.doc.pages.insert(docId, layerName, request) -> DocPagesInsert200Response +
client.doc.pages.extract(docId, layerName, request) -> InputStream
@@ -4066,7 +4128,7 @@ client.doc().pages().flatten(
-Multipart: a JSON `body` part `{"position"?: PagePosition, "resources": {"source": ""}}` (position omitted → the end), and the standalone PDF whose pages are copied in as the part `resource:`. The inserted copies get fresh page object numbers, returned in insertion order. +A read, not a mutation: the source document is untouched and no event is published. Body is `{"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}`; the response body is the new PDF. With `flatten` the copy is the pages as they draw for `usage` (`"print"`: a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes `doc.download` or `doc.download.flattened`, and paints only what the caller may read; `includeAnnotations` and `includeFormFields` choose what it paints, and are refused without `flatten`.
@@ -4081,12 +4143,18 @@ Multipart: a JSON `body` part `{"position"?: PagePosition, "resources": {"source
```java -client.doc().pages().insert( +client.doc().pages().extract( "docId", "layerName", - null, - InsertPagesRequest + ExtractPagesRequest .builder() + .body( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} + ) .build() ); ``` @@ -4127,7 +4195,7 @@ client.doc().pages().insert(
-**idempotencyKey:** `Optional` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. +**request:** `Map`
@@ -4139,24 +4207,10 @@ client.doc().pages().insert(
-
client.doc.pages.insertBlank(docId, layerName, request) -> DocPagesInsertBlank200Response -
-
- -#### 📝 Description - -
-
- +
client.doc.pages.flatten(docId, layerName, request) -> DocPagesFlatten200Response
-Body is `{"size": {"width", "height"}, "count"?, "position"?}` — size in PDF points, count in [1, 100], `position` a `PagePosition` (omitted → the end). -
-
-
-
- #### 🔌 Usage
@@ -4166,10 +4220,10 @@ Body is `{"size": {"width", "height"}, "count"?, "position"?}` — size in PDF p
```java -client.doc().pages().insertBlank( +client.doc().pages().flatten( "docId", "layerName", - InsertBlankPagesRequest + FlattenPagesRequest .builder() .body( new HashMap() {{ @@ -4398,187 +4452,6 @@ client.doc().pages().removeName(
-
-
-
- -
client.doc.pages.reorder(docId, layerName, request) -> DocPagesReorder200Response -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.doc().pages().reorder( - "docId", - "layerName", - DocPagesReorderRequest - .builder() - .position( - PagePosition.of(PagePositionZero.START) - ) - .pages( - Arrays.asList( - PageRef - .builder() - .kind(PageRefKind.OBJECT_NUMBER) - .objectNumber(1) - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**docId:** `String` - -
-
- -
-
- -**layerName:** `String` - -
-
- -
-
- -**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. - -
-
- -
-
- -**idempotencyKey:** `Optional` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - -
-
- -
-
- -**pages:** `List` - -
-
- -
-
- -**position:** `PagePosition` - -
-
-
-
- - -
-
-
- -
client.doc.pages.rotate(docId, layerName, request) -> DocPagesRotate200Response -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.doc().pages().rotate( - "docId", - "layerName", - RotatePagesRequest - .builder() - .body( - new HashMap() {{ - put("key", "value"); - }} - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**docId:** `String` - -
-
- -
-
- -**layerName:** `String` - -
-
- -
-
- -**documentPassword:** `Optional` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. - -
-
- -
-
- -**idempotencyKey:** `Optional` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- -
diff --git a/src/main/java/api/core/ClientOptions.java b/src/main/java/api/core/ClientOptions.java index b7ecfe6..31e9533 100644 --- a/src/main/java/api/core/ClientOptions.java +++ b/src/main/java/api/core/ClientOptions.java @@ -49,7 +49,7 @@ private ClientOptions( { put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.cloudpdf:sdk"); - put("X-Fern-SDK-Version", "3.0.0-alpha.15"); + put("X-Fern-SDK-Version", "3.0.0-alpha.16"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/api/errors/ContentTooLargeError.java b/src/main/java/api/errors/ContentTooLargeError.java index bd30678..a3f6811 100644 --- a/src/main/java/api/errors/ContentTooLargeError.java +++ b/src/main/java/api/errors/ContentTooLargeError.java @@ -4,21 +4,20 @@ package com.cloudpdf.api.errors; import com.cloudpdf.api.core.CloudPDFApiException; -import com.cloudpdf.api.types.EngineErrorPayload; import okhttp3.Response; public final class ContentTooLargeError extends CloudPDFApiException { /** * The body of the response that triggered the exception. */ - private final EngineErrorPayload body; + private final Object body; - public ContentTooLargeError(EngineErrorPayload body) { + public ContentTooLargeError(Object body) { super("ContentTooLargeError", 413, body); this.body = body; } - public ContentTooLargeError(EngineErrorPayload body, Response rawResponse) { + public ContentTooLargeError(Object body, Response rawResponse) { super("ContentTooLargeError", 413, body, rawResponse); this.body = body; } @@ -27,7 +26,7 @@ public ContentTooLargeError(EngineErrorPayload body, Response rawResponse) { * @return the body */ @java.lang.Override - public EngineErrorPayload body() { + public Object body() { return this.body; } } diff --git a/src/main/java/api/resources/doc/AsyncDocClient.java b/src/main/java/api/resources/doc/AsyncDocClient.java index a1dca82..8a3f8a6 100644 --- a/src/main/java/api/resources/doc/AsyncDocClient.java +++ b/src/main/java/api/resources/doc/AsyncDocClient.java @@ -7,8 +7,10 @@ import com.cloudpdf.api.core.RequestOptions; import com.cloudpdf.api.core.Suppliers; import com.cloudpdf.api.resources.doc.annotations.AsyncAnnotationsClient; +import com.cloudpdf.api.resources.doc.attachments.AsyncAttachmentsClient; import com.cloudpdf.api.resources.doc.forms.AsyncFormsClient; import com.cloudpdf.api.resources.doc.metadata.AsyncMetadataClient; +import com.cloudpdf.api.resources.doc.outline.AsyncOutlineClient; import com.cloudpdf.api.resources.doc.pages.AsyncPagesClient; import com.cloudpdf.api.resources.doc.redactions.AsyncRedactionsClient; import com.cloudpdf.api.resources.doc.requests.DocChangesRequest; @@ -34,10 +36,14 @@ public class AsyncDocClient { protected final Supplier annotationsClient; + protected final Supplier attachmentsClient; + protected final Supplier formsClient; protected final Supplier metadataClient; + protected final Supplier outlineClient; + protected final Supplier pagesClient; protected final Supplier redactionsClient; @@ -50,8 +56,10 @@ public AsyncDocClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new AsyncRawDocClient(clientOptions); this.annotationsClient = Suppliers.memoize(() -> new AsyncAnnotationsClient(clientOptions)); + this.attachmentsClient = Suppliers.memoize(() -> new AsyncAttachmentsClient(clientOptions)); this.formsClient = Suppliers.memoize(() -> new AsyncFormsClient(clientOptions)); this.metadataClient = Suppliers.memoize(() -> new AsyncMetadataClient(clientOptions)); + this.outlineClient = Suppliers.memoize(() -> new AsyncOutlineClient(clientOptions)); this.pagesClient = Suppliers.memoize(() -> new AsyncPagesClient(clientOptions)); this.redactionsClient = Suppliers.memoize(() -> new AsyncRedactionsClient(clientOptions)); this.signaturesClient = Suppliers.memoize(() -> new AsyncSignaturesClient(clientOptions)); @@ -83,14 +91,14 @@ public CompletableFuture head( } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CompletableFuture changes(String docId, String layerName, DocChangesRequest request) { return this.rawClient.changes(docId, layerName, request).thenApply(response -> response.body()); } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CompletableFuture changes( String docId, String layerName, DocChangesRequest request, RequestOptions requestOptions) { @@ -195,6 +203,10 @@ public AsyncAnnotationsClient annotations() { return this.annotationsClient.get(); } + public AsyncAttachmentsClient attachments() { + return this.attachmentsClient.get(); + } + public AsyncFormsClient forms() { return this.formsClient.get(); } @@ -203,6 +215,10 @@ public AsyncMetadataClient metadata() { return this.metadataClient.get(); } + public AsyncOutlineClient outline() { + return this.outlineClient.get(); + } + public AsyncPagesClient pages() { return this.pagesClient.get(); } diff --git a/src/main/java/api/resources/doc/AsyncRawDocClient.java b/src/main/java/api/resources/doc/AsyncRawDocClient.java index 12a76d5..35ff242 100644 --- a/src/main/java/api/resources/doc/AsyncRawDocClient.java +++ b/src/main/java/api/resources/doc/AsyncRawDocClient.java @@ -26,7 +26,6 @@ import com.cloudpdf.api.types.DocHead200Response; import com.cloudpdf.api.types.DocManifest200Response; import com.cloudpdf.api.types.DocText200Response; -import com.cloudpdf.api.types.EngineErrorPayload; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.io.InputStream; @@ -140,7 +139,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CompletableFuture> changes( String docId, String layerName, DocChangesRequest request) { @@ -148,7 +147,7 @@ public CompletableFuture> chan } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CompletableFuture> changes( String docId, String layerName, DocChangesRequest request, RequestOptions requestOptions) { @@ -226,8 +225,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO return; case 413: future.completeExceptionally(new ContentTooLargeError( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, EngineErrorPayload.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; } diff --git a/src/main/java/api/resources/doc/DocClient.java b/src/main/java/api/resources/doc/DocClient.java index 5ddfe52..b0b9a2f 100644 --- a/src/main/java/api/resources/doc/DocClient.java +++ b/src/main/java/api/resources/doc/DocClient.java @@ -7,8 +7,10 @@ import com.cloudpdf.api.core.RequestOptions; import com.cloudpdf.api.core.Suppliers; import com.cloudpdf.api.resources.doc.annotations.AnnotationsClient; +import com.cloudpdf.api.resources.doc.attachments.AttachmentsClient; import com.cloudpdf.api.resources.doc.forms.FormsClient; import com.cloudpdf.api.resources.doc.metadata.MetadataClient; +import com.cloudpdf.api.resources.doc.outline.OutlineClient; import com.cloudpdf.api.resources.doc.pages.PagesClient; import com.cloudpdf.api.resources.doc.redactions.RedactionsClient; import com.cloudpdf.api.resources.doc.requests.DocChangesRequest; @@ -33,10 +35,14 @@ public class DocClient { protected final Supplier annotationsClient; + protected final Supplier attachmentsClient; + protected final Supplier formsClient; protected final Supplier metadataClient; + protected final Supplier outlineClient; + protected final Supplier pagesClient; protected final Supplier redactionsClient; @@ -49,8 +55,10 @@ public DocClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new RawDocClient(clientOptions); this.annotationsClient = Suppliers.memoize(() -> new AnnotationsClient(clientOptions)); + this.attachmentsClient = Suppliers.memoize(() -> new AttachmentsClient(clientOptions)); this.formsClient = Suppliers.memoize(() -> new FormsClient(clientOptions)); this.metadataClient = Suppliers.memoize(() -> new MetadataClient(clientOptions)); + this.outlineClient = Suppliers.memoize(() -> new OutlineClient(clientOptions)); this.pagesClient = Suppliers.memoize(() -> new PagesClient(clientOptions)); this.redactionsClient = Suppliers.memoize(() -> new RedactionsClient(clientOptions)); this.signaturesClient = Suppliers.memoize(() -> new SignaturesClient(clientOptions)); @@ -81,14 +89,14 @@ public DocHead200Response head(String docId, HeadDocRequest request, RequestOpti } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public DocChanges200Response changes(String docId, String layerName, DocChangesRequest request) { return this.rawClient.changes(docId, layerName, request).body(); } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public DocChanges200Response changes( String docId, String layerName, DocChangesRequest request, RequestOptions requestOptions) { @@ -187,6 +195,10 @@ public AnnotationsClient annotations() { return this.annotationsClient.get(); } + public AttachmentsClient attachments() { + return this.attachmentsClient.get(); + } + public FormsClient forms() { return this.formsClient.get(); } @@ -195,6 +207,10 @@ public MetadataClient metadata() { return this.metadataClient.get(); } + public OutlineClient outline() { + return this.outlineClient.get(); + } + public PagesClient pages() { return this.pagesClient.get(); } diff --git a/src/main/java/api/resources/doc/RawDocClient.java b/src/main/java/api/resources/doc/RawDocClient.java index 121fff5..3ef810e 100644 --- a/src/main/java/api/resources/doc/RawDocClient.java +++ b/src/main/java/api/resources/doc/RawDocClient.java @@ -26,7 +26,6 @@ import com.cloudpdf.api.types.DocHead200Response; import com.cloudpdf.api.types.DocManifest200Response; import com.cloudpdf.api.types.DocText200Response; -import com.cloudpdf.api.types.EngineErrorPayload; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.io.InputStream; @@ -118,7 +117,7 @@ public CloudPDFClientHttpResponse head( } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CloudPDFClientHttpResponse changes( String docId, String layerName, DocChangesRequest request) { @@ -126,7 +125,7 @@ public CloudPDFClientHttpResponse changes( } /** - * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. + * Each change stands on its own and names itself by opId: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its opId, a change gets the same answer, refusals included; a different change under an answered opId is refused (IdempotencyKeyReused). { opId, undoOf } undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need doc.annotate.modify, form values doc.forms.fill, form structure doc.forms.modify, metadata doc.metadata.modify, outline doc.outline.modify, pages doc.pages.assemble, embedded files doc.attachments.modify. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON body part, each op naming its files by role as resources: { <role>: '<key>' }, and each file as the part resource:<key>. At most 64 changes per request and 512 ops per change. */ public CloudPDFClientHttpResponse changes( String docId, String layerName, DocChangesRequest request, RequestOptions requestOptions) { @@ -193,8 +192,7 @@ public CloudPDFClientHttpResponse changes( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 413: throw new ContentTooLargeError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, EngineErrorPayload.class), - response); + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); } } catch (JsonProcessingException ignored) { // unable to map error response, throwing generic error diff --git a/src/main/java/api/resources/doc/annotations/AnnotationsClient.java b/src/main/java/api/resources/doc/annotations/AnnotationsClient.java index dfc3d28..3ba5bd6 100644 --- a/src/main/java/api/resources/doc/annotations/AnnotationsClient.java +++ b/src/main/java/api/resources/doc/annotations/AnnotationsClient.java @@ -13,6 +13,7 @@ import com.cloudpdf.api.resources.doc.annotations.requests.ListAllAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ListAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ReadAppearanceAnnotationsRequest; +import com.cloudpdf.api.resources.doc.annotations.requests.ReadFileAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.UpdateAnnotationsRequest; import com.cloudpdf.api.types.AnnotationList; import com.cloudpdf.api.types.DocAnnotationsCreate200Response; @@ -230,6 +231,48 @@ public InputStream readAppearance( .body(); } + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream readFile(String docId, String layerName, String pageKey, String annotKey) { + return this.rawClient.readFile(docId, layerName, pageKey, annotKey).body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream readFile( + String docId, String layerName, String pageKey, String annotKey, RequestOptions requestOptions) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, requestOptions) + .body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream readFile( + String docId, String layerName, String pageKey, String annotKey, ReadFileAnnotationsRequest request) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, request) + .body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream readFile( + String docId, + String layerName, + String pageKey, + String annotKey, + ReadFileAnnotationsRequest request, + RequestOptions requestOptions) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, request, requestOptions) + .body(); + } + public InputStream exportAppearance(String docId, String layerName, String pageKey, Map body) { return this.rawClient.exportAppearance(docId, layerName, pageKey, body).body(); } diff --git a/src/main/java/api/resources/doc/annotations/AsyncAnnotationsClient.java b/src/main/java/api/resources/doc/annotations/AsyncAnnotationsClient.java index 58f23fb..8ddcc5d 100644 --- a/src/main/java/api/resources/doc/annotations/AsyncAnnotationsClient.java +++ b/src/main/java/api/resources/doc/annotations/AsyncAnnotationsClient.java @@ -13,6 +13,7 @@ import com.cloudpdf.api.resources.doc.annotations.requests.ListAllAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ListAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ReadAppearanceAnnotationsRequest; +import com.cloudpdf.api.resources.doc.annotations.requests.ReadFileAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.UpdateAnnotationsRequest; import com.cloudpdf.api.types.AnnotationList; import com.cloudpdf.api.types.DocAnnotationsCreate200Response; @@ -236,6 +237,48 @@ public CompletableFuture readAppearance( .thenApply(response -> response.body()); } + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture readFile(String docId, String layerName, String pageKey, String annotKey) { + return this.rawClient.readFile(docId, layerName, pageKey, annotKey).thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture readFile( + String docId, String layerName, String pageKey, String annotKey, RequestOptions requestOptions) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, requestOptions) + .thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture readFile( + String docId, String layerName, String pageKey, String annotKey, ReadFileAnnotationsRequest request) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, request) + .thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture readFile( + String docId, + String layerName, + String pageKey, + String annotKey, + ReadFileAnnotationsRequest request, + RequestOptions requestOptions) { + return this.rawClient + .readFile(docId, layerName, pageKey, annotKey, request, requestOptions) + .thenApply(response -> response.body()); + } + public CompletableFuture exportAppearance( String docId, String layerName, String pageKey, Map body) { return this.rawClient.exportAppearance(docId, layerName, pageKey, body).thenApply(response -> response.body()); diff --git a/src/main/java/api/resources/doc/annotations/AsyncRawAnnotationsClient.java b/src/main/java/api/resources/doc/annotations/AsyncRawAnnotationsClient.java index 0ccb504..03dedb7 100644 --- a/src/main/java/api/resources/doc/annotations/AsyncRawAnnotationsClient.java +++ b/src/main/java/api/resources/doc/annotations/AsyncRawAnnotationsClient.java @@ -14,6 +14,7 @@ import com.cloudpdf.api.core.RetryInterceptor; import com.cloudpdf.api.errors.BadRequestError; import com.cloudpdf.api.errors.ConflictError; +import com.cloudpdf.api.errors.ContentTooLargeError; import com.cloudpdf.api.errors.NotFoundError; import com.cloudpdf.api.resources.doc.annotations.requests.CreateAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.DeleteAnnotationsRequest; @@ -23,6 +24,7 @@ import com.cloudpdf.api.resources.doc.annotations.requests.ListAllAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ListAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ReadAppearanceAnnotationsRequest; +import com.cloudpdf.api.resources.doc.annotations.requests.ReadFileAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.UpdateAnnotationsRequest; import com.cloudpdf.api.types.AnnotationList; import com.cloudpdf.api.types.DocAnnotationsCreate200Response; @@ -782,6 +784,144 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> readFile( + String docId, String layerName, String pageKey, String annotKey) { + return readFile( + docId, + layerName, + pageKey, + annotKey, + ReadFileAnnotationsRequest.builder().build()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> readFile( + String docId, String layerName, String pageKey, String annotKey, RequestOptions requestOptions) { + return readFile( + docId, + layerName, + pageKey, + annotKey, + ReadFileAnnotationsRequest.builder().build(), + requestOptions); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> readFile( + String docId, String layerName, String pageKey, String annotKey, ReadFileAnnotationsRequest request) { + return readFile(docId, layerName, pageKey, annotKey, request, null); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> readFile( + String docId, + String layerName, + String pageKey, + String annotKey, + ReadFileAnnotationsRequest request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("annotations/pages") + .addPathSegment(pageKey) + .addPathSegments("items") + .addPathSegment(annotKey) + .addPathSegments("resources") + .addPathSegments("file"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + future.complete( + new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 413: + future.completeExceptionally(new ContentTooLargeError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + }); + return future; + } + public CompletableFuture> exportAppearance( String docId, String layerName, String pageKey, Map body) { return exportAppearance( diff --git a/src/main/java/api/resources/doc/annotations/RawAnnotationsClient.java b/src/main/java/api/resources/doc/annotations/RawAnnotationsClient.java index 5c19634..05ac7ab 100644 --- a/src/main/java/api/resources/doc/annotations/RawAnnotationsClient.java +++ b/src/main/java/api/resources/doc/annotations/RawAnnotationsClient.java @@ -14,6 +14,7 @@ import com.cloudpdf.api.core.RetryInterceptor; import com.cloudpdf.api.errors.BadRequestError; import com.cloudpdf.api.errors.ConflictError; +import com.cloudpdf.api.errors.ContentTooLargeError; import com.cloudpdf.api.errors.NotFoundError; import com.cloudpdf.api.resources.doc.annotations.requests.CreateAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.DeleteAnnotationsRequest; @@ -23,6 +24,7 @@ import com.cloudpdf.api.resources.doc.annotations.requests.ListAllAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ListAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.ReadAppearanceAnnotationsRequest; +import com.cloudpdf.api.resources.doc.annotations.requests.ReadFileAnnotationsRequest; import com.cloudpdf.api.resources.doc.annotations.requests.UpdateAnnotationsRequest; import com.cloudpdf.api.types.AnnotationList; import com.cloudpdf.api.types.DocAnnotationsCreate200Response; @@ -666,6 +668,123 @@ public CloudPDFClientHttpResponse readAppearance( } } + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse readFile( + String docId, String layerName, String pageKey, String annotKey) { + return readFile( + docId, + layerName, + pageKey, + annotKey, + ReadFileAnnotationsRequest.builder().build()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse readFile( + String docId, String layerName, String pageKey, String annotKey, RequestOptions requestOptions) { + return readFile( + docId, + layerName, + pageKey, + annotKey, + ReadFileAnnotationsRequest.builder().build(), + requestOptions); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse readFile( + String docId, String layerName, String pageKey, String annotKey, ReadFileAnnotationsRequest request) { + return readFile(docId, layerName, pageKey, annotKey, request, null); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse readFile( + String docId, + String layerName, + String pageKey, + String annotKey, + ReadFileAnnotationsRequest request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("annotations/pages") + .addPathSegment(pageKey) + .addPathSegments("items") + .addPathSegment(annotKey) + .addPathSegments("resources") + .addPathSegments("file"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try { + Response response = client.newCall(okhttpRequest).execute(); + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 413: + throw new ContentTooLargeError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new CloudPDFException("Network error executing HTTP request", e); + } + } + public CloudPDFClientHttpResponse exportAppearance( String docId, String layerName, String pageKey, Map body) { return exportAppearance( diff --git a/src/main/java/api/resources/doc/pages/requests/RotatePagesRequest.java b/src/main/java/api/resources/doc/annotations/requests/ReadFileAnnotationsRequest.java similarity index 50% rename from src/main/java/api/resources/doc/pages/requests/RotatePagesRequest.java rename to src/main/java/api/resources/doc/annotations/requests/ReadFileAnnotationsRequest.java index fe7a240..baa00d4 100644 --- a/src/main/java/api/resources/doc/pages/requests/RotatePagesRequest.java +++ b/src/main/java/api/resources/doc/annotations/requests/ReadFileAnnotationsRequest.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.cloudpdf.api.resources.doc.pages.requests; +package com.cloudpdf.api.resources.doc.annotations.requests; import com.cloudpdf.api.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -9,35 +9,21 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RotatePagesRequest.Builder.class) -public final class RotatePagesRequest { +@JsonDeserialize(builder = ReadFileAnnotationsRequest.Builder.class) +public final class ReadFileAnnotationsRequest { private final Optional documentPassword; - private final Optional idempotencyKey; - - private final Map body; - private final Map additionalProperties; - private RotatePagesRequest( - Optional documentPassword, - Optional idempotencyKey, - Map body, - Map additionalProperties) { + private ReadFileAnnotationsRequest(Optional documentPassword, Map additionalProperties) { this.documentPassword = documentPassword; - this.idempotencyKey = idempotencyKey; - this.body = body; this.additionalProperties = additionalProperties; } @@ -49,23 +35,10 @@ public Optional getDocumentPassword() { return documentPassword; } - /** - * @return Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - */ - @JsonIgnore - public Optional getIdempotencyKey() { - return idempotencyKey; - } - - @JsonProperty("body") - public Map getBody() { - return body; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof RotatePagesRequest && equalTo((RotatePagesRequest) other); + return other instanceof ReadFileAnnotationsRequest && equalTo((ReadFileAnnotationsRequest) other); } @JsonAnyGetter @@ -73,15 +46,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(RotatePagesRequest other) { - return documentPassword.equals(other.documentPassword) - && idempotencyKey.equals(other.idempotencyKey) - && body.equals(other.body); + private boolean equalTo(ReadFileAnnotationsRequest other) { + return documentPassword.equals(other.documentPassword); } @java.lang.Override public int hashCode() { - return Objects.hash(this.documentPassword, this.idempotencyKey, this.body); + return Objects.hash(this.documentPassword); } @java.lang.Override @@ -97,19 +68,13 @@ public static Builder builder() { public static final class Builder { private Optional documentPassword = Optional.empty(); - private Optional idempotencyKey = Optional.empty(); - - private Map body = new LinkedHashMap<>(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(RotatePagesRequest other) { + public Builder from(ReadFileAnnotationsRequest other) { documentPassword(other.getDocumentPassword()); - idempotencyKey(other.getIdempotencyKey()); - body(other.getBody()); return this; } @@ -126,42 +91,8 @@ public Builder documentPassword(String documentPassword) { return this; } - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - public Builder idempotencyKey(Optional idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = Optional.ofNullable(idempotencyKey); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Map body) { - this.body.clear(); - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder putAllBody(Map body) { - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder body(String key, Object value) { - this.body.put(key, value); - return this; - } - - public RotatePagesRequest build() { - return new RotatePagesRequest(documentPassword, idempotencyKey, body, additionalProperties); + public ReadFileAnnotationsRequest build() { + return new ReadFileAnnotationsRequest(documentPassword, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/resources/doc/attachments/AsyncAttachmentsClient.java b/src/main/java/api/resources/doc/attachments/AsyncAttachmentsClient.java new file mode 100644 index 0000000..bdaa49f --- /dev/null +++ b/src/main/java/api/resources/doc/attachments/AsyncAttachmentsClient.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.attachments; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.resources.doc.attachments.requests.DownloadAttachmentsRequest; +import com.cloudpdf.api.resources.doc.attachments.requests.ListAttachmentsRequest; +import com.cloudpdf.api.types.AttachmentList; +import java.io.InputStream; +import java.util.concurrent.CompletableFuture; + +public class AsyncAttachmentsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawAttachmentsClient rawClient; + + public AsyncAttachmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawAttachmentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawAttachmentsClient withRawResponse() { + return this.rawClient; + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture download(String docId, String layerName, String fileKey) { + return this.rawClient.download(docId, layerName, fileKey).thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture download( + String docId, String layerName, String fileKey, RequestOptions requestOptions) { + return this.rawClient + .download(docId, layerName, fileKey, requestOptions) + .thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture download( + String docId, String layerName, String fileKey, DownloadAttachmentsRequest request) { + return this.rawClient.download(docId, layerName, fileKey, request).thenApply(response -> response.body()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture download( + String docId, + String layerName, + String fileKey, + DownloadAttachmentsRequest request, + RequestOptions requestOptions) { + return this.rawClient + .download(docId, layerName, fileKey, request, requestOptions) + .thenApply(response -> response.body()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture list(String docId, String layerName) { + return this.rawClient.list(docId, layerName).thenApply(response -> response.body()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture list(String docId, String layerName, RequestOptions requestOptions) { + return this.rawClient.list(docId, layerName, requestOptions).thenApply(response -> response.body()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture list(String docId, String layerName, ListAttachmentsRequest request) { + return this.rawClient.list(docId, layerName, request).thenApply(response -> response.body()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture list( + String docId, String layerName, ListAttachmentsRequest request, RequestOptions requestOptions) { + return this.rawClient.list(docId, layerName, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/api/resources/doc/attachments/AsyncRawAttachmentsClient.java b/src/main/java/api/resources/doc/attachments/AsyncRawAttachmentsClient.java new file mode 100644 index 0000000..086b2f1 --- /dev/null +++ b/src/main/java/api/resources/doc/attachments/AsyncRawAttachmentsClient.java @@ -0,0 +1,269 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.attachments; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.CloudPDFApiException; +import com.cloudpdf.api.core.CloudPDFClientHttpResponse; +import com.cloudpdf.api.core.CloudPDFException; +import com.cloudpdf.api.core.ObjectMappers; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.core.ResponseBodyInputStream; +import com.cloudpdf.api.core.RetryInterceptor; +import com.cloudpdf.api.errors.BadRequestError; +import com.cloudpdf.api.errors.ContentTooLargeError; +import com.cloudpdf.api.errors.NotFoundError; +import com.cloudpdf.api.resources.doc.attachments.requests.DownloadAttachmentsRequest; +import com.cloudpdf.api.resources.doc.attachments.requests.ListAttachmentsRequest; +import com.cloudpdf.api.types.AttachmentList; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.io.InputStream; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawAttachmentsClient { + protected final ClientOptions clientOptions; + + public AsyncRawAttachmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> download( + String docId, String layerName, String fileKey) { + return download( + docId, layerName, fileKey, DownloadAttachmentsRequest.builder().build()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> download( + String docId, String layerName, String fileKey, RequestOptions requestOptions) { + return download( + docId, layerName, fileKey, DownloadAttachmentsRequest.builder().build(), requestOptions); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> download( + String docId, String layerName, String fileKey, DownloadAttachmentsRequest request) { + return download(docId, layerName, fileKey, request, null); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CompletableFuture> download( + String docId, + String layerName, + String fileKey, + DownloadAttachmentsRequest request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("attachment-files") + .addPathSegment(fileKey) + .addPathSegments("data"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + future.complete( + new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 413: + future.completeExceptionally(new ContentTooLargeError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture> list(String docId, String layerName) { + return list(docId, layerName, ListAttachmentsRequest.builder().build()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture> list( + String docId, String layerName, RequestOptions requestOptions) { + return list(docId, layerName, ListAttachmentsRequest.builder().build(), requestOptions); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture> list( + String docId, String layerName, ListAttachmentsRequest request) { + return list(docId, layerName, request, null); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CompletableFuture> list( + String docId, String layerName, ListAttachmentsRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("attachments"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new CloudPDFClientHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AttachmentList.class), + response)); + return; + } + try { + if (response.code() == 404) { + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/api/resources/doc/attachments/AttachmentsClient.java b/src/main/java/api/resources/doc/attachments/AttachmentsClient.java new file mode 100644 index 0000000..ee869d8 --- /dev/null +++ b/src/main/java/api/resources/doc/attachments/AttachmentsClient.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.attachments; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.resources.doc.attachments.requests.DownloadAttachmentsRequest; +import com.cloudpdf.api.resources.doc.attachments.requests.ListAttachmentsRequest; +import com.cloudpdf.api.types.AttachmentList; +import java.io.InputStream; + +public class AttachmentsClient { + protected final ClientOptions clientOptions; + + private final RawAttachmentsClient rawClient; + + public AttachmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawAttachmentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawAttachmentsClient withRawResponse() { + return this.rawClient; + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream download(String docId, String layerName, String fileKey) { + return this.rawClient.download(docId, layerName, fileKey).body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream download(String docId, String layerName, String fileKey, RequestOptions requestOptions) { + return this.rawClient + .download(docId, layerName, fileKey, requestOptions) + .body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream download(String docId, String layerName, String fileKey, DownloadAttachmentsRequest request) { + return this.rawClient.download(docId, layerName, fileKey, request).body(); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public InputStream download( + String docId, + String layerName, + String fileKey, + DownloadAttachmentsRequest request, + RequestOptions requestOptions) { + return this.rawClient + .download(docId, layerName, fileKey, request, requestOptions) + .body(); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public AttachmentList list(String docId, String layerName) { + return this.rawClient.list(docId, layerName).body(); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public AttachmentList list(String docId, String layerName, RequestOptions requestOptions) { + return this.rawClient.list(docId, layerName, requestOptions).body(); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public AttachmentList list(String docId, String layerName, ListAttachmentsRequest request) { + return this.rawClient.list(docId, layerName, request).body(); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public AttachmentList list( + String docId, String layerName, ListAttachmentsRequest request, RequestOptions requestOptions) { + return this.rawClient.list(docId, layerName, request, requestOptions).body(); + } +} diff --git a/src/main/java/api/resources/doc/attachments/RawAttachmentsClient.java b/src/main/java/api/resources/doc/attachments/RawAttachmentsClient.java new file mode 100644 index 0000000..ed0c1d6 --- /dev/null +++ b/src/main/java/api/resources/doc/attachments/RawAttachmentsClient.java @@ -0,0 +1,227 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.attachments; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.CloudPDFApiException; +import com.cloudpdf.api.core.CloudPDFClientHttpResponse; +import com.cloudpdf.api.core.CloudPDFException; +import com.cloudpdf.api.core.ObjectMappers; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.core.ResponseBodyInputStream; +import com.cloudpdf.api.core.RetryInterceptor; +import com.cloudpdf.api.errors.BadRequestError; +import com.cloudpdf.api.errors.ContentTooLargeError; +import com.cloudpdf.api.errors.NotFoundError; +import com.cloudpdf.api.resources.doc.attachments.requests.DownloadAttachmentsRequest; +import com.cloudpdf.api.resources.doc.attachments.requests.ListAttachmentsRequest; +import com.cloudpdf.api.types.AttachmentList; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.io.InputStream; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawAttachmentsClient { + protected final ClientOptions clientOptions; + + public RawAttachmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse download(String docId, String layerName, String fileKey) { + return download( + docId, layerName, fileKey, DownloadAttachmentsRequest.builder().build()); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse download( + String docId, String layerName, String fileKey, RequestOptions requestOptions) { + return download( + docId, layerName, fileKey, DownloadAttachmentsRequest.builder().build(), requestOptions); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse download( + String docId, String layerName, String fileKey, DownloadAttachmentsRequest request) { + return download(docId, layerName, fileKey, request, null); + } + + /** + * A file that decodes past the server's limit is refused (PayloadTooLarge). + */ + public CloudPDFClientHttpResponse download( + String docId, + String layerName, + String fileKey, + DownloadAttachmentsRequest request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("attachment-files") + .addPathSegment(fileKey) + .addPathSegments("data"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try { + Response response = client.newCall(okhttpRequest).execute(); + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 413: + throw new ContentTooLargeError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new CloudPDFException("Network error executing HTTP request", e); + } + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CloudPDFClientHttpResponse list(String docId, String layerName) { + return list(docId, layerName, ListAttachmentsRequest.builder().build()); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CloudPDFClientHttpResponse list( + String docId, String layerName, RequestOptions requestOptions) { + return list(docId, layerName, ListAttachmentsRequest.builder().build(), requestOptions); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CloudPDFClientHttpResponse list( + String docId, String layerName, ListAttachmentsRequest request) { + return list(docId, layerName, request, null); + } + + /** + * A file-attachment annotation's file is listed with the annotation; read its bytes with doc.annotations.readFile. + */ + public CloudPDFClientHttpResponse list( + String docId, String layerName, ListAttachmentsRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("attachments"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new CloudPDFClientHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AttachmentList.class), response); + } + try { + if (response.code() == 404) { + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new CloudPDFException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/api/resources/doc/pages/requests/DeletePagesRequest.java b/src/main/java/api/resources/doc/attachments/requests/DownloadAttachmentsRequest.java similarity index 51% rename from src/main/java/api/resources/doc/pages/requests/DeletePagesRequest.java rename to src/main/java/api/resources/doc/attachments/requests/DownloadAttachmentsRequest.java index ae1e525..926c5a0 100644 --- a/src/main/java/api/resources/doc/pages/requests/DeletePagesRequest.java +++ b/src/main/java/api/resources/doc/attachments/requests/DownloadAttachmentsRequest.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.cloudpdf.api.resources.doc.pages.requests; +package com.cloudpdf.api.resources.doc.attachments.requests; import com.cloudpdf.api.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -9,35 +9,21 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DeletePagesRequest.Builder.class) -public final class DeletePagesRequest { +@JsonDeserialize(builder = DownloadAttachmentsRequest.Builder.class) +public final class DownloadAttachmentsRequest { private final Optional documentPassword; - private final Optional idempotencyKey; - - private final Map body; - private final Map additionalProperties; - private DeletePagesRequest( - Optional documentPassword, - Optional idempotencyKey, - Map body, - Map additionalProperties) { + private DownloadAttachmentsRequest(Optional documentPassword, Map additionalProperties) { this.documentPassword = documentPassword; - this.idempotencyKey = idempotencyKey; - this.body = body; this.additionalProperties = additionalProperties; } @@ -49,23 +35,10 @@ public Optional getDocumentPassword() { return documentPassword; } - /** - * @return Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - */ - @JsonIgnore - public Optional getIdempotencyKey() { - return idempotencyKey; - } - - @JsonProperty("body") - public Map getBody() { - return body; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DeletePagesRequest && equalTo((DeletePagesRequest) other); + return other instanceof DownloadAttachmentsRequest && equalTo((DownloadAttachmentsRequest) other); } @JsonAnyGetter @@ -73,15 +46,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DeletePagesRequest other) { - return documentPassword.equals(other.documentPassword) - && idempotencyKey.equals(other.idempotencyKey) - && body.equals(other.body); + private boolean equalTo(DownloadAttachmentsRequest other) { + return documentPassword.equals(other.documentPassword); } @java.lang.Override public int hashCode() { - return Objects.hash(this.documentPassword, this.idempotencyKey, this.body); + return Objects.hash(this.documentPassword); } @java.lang.Override @@ -97,19 +68,13 @@ public static Builder builder() { public static final class Builder { private Optional documentPassword = Optional.empty(); - private Optional idempotencyKey = Optional.empty(); - - private Map body = new LinkedHashMap<>(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(DeletePagesRequest other) { + public Builder from(DownloadAttachmentsRequest other) { documentPassword(other.getDocumentPassword()); - idempotencyKey(other.getIdempotencyKey()); - body(other.getBody()); return this; } @@ -126,42 +91,8 @@ public Builder documentPassword(String documentPassword) { return this; } - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - public Builder idempotencyKey(Optional idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = Optional.ofNullable(idempotencyKey); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Map body) { - this.body.clear(); - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder putAllBody(Map body) { - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder body(String key, Object value) { - this.body.put(key, value); - return this; - } - - public DeletePagesRequest build() { - return new DeletePagesRequest(documentPassword, idempotencyKey, body, additionalProperties); + public DownloadAttachmentsRequest build() { + return new DownloadAttachmentsRequest(documentPassword, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/resources/doc/pages/requests/InsertPagesRequest.java b/src/main/java/api/resources/doc/attachments/requests/ListAttachmentsRequest.java similarity index 61% rename from src/main/java/api/resources/doc/pages/requests/InsertPagesRequest.java rename to src/main/java/api/resources/doc/attachments/requests/ListAttachmentsRequest.java index e658983..c16ce57 100644 --- a/src/main/java/api/resources/doc/pages/requests/InsertPagesRequest.java +++ b/src/main/java/api/resources/doc/attachments/requests/ListAttachmentsRequest.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.cloudpdf.api.resources.doc.pages.requests; +package com.cloudpdf.api.resources.doc.attachments.requests; import com.cloudpdf.api.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -16,20 +16,14 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InsertPagesRequest.Builder.class) -public final class InsertPagesRequest { +@JsonDeserialize(builder = ListAttachmentsRequest.Builder.class) +public final class ListAttachmentsRequest { private final Optional documentPassword; - private final Optional idempotencyKey; - private final Map additionalProperties; - private InsertPagesRequest( - Optional documentPassword, - Optional idempotencyKey, - Map additionalProperties) { + private ListAttachmentsRequest(Optional documentPassword, Map additionalProperties) { this.documentPassword = documentPassword; - this.idempotencyKey = idempotencyKey; this.additionalProperties = additionalProperties; } @@ -41,18 +35,10 @@ public Optional getDocumentPassword() { return documentPassword; } - /** - * @return Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - */ - @JsonIgnore - public Optional getIdempotencyKey() { - return idempotencyKey; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof InsertPagesRequest && equalTo((InsertPagesRequest) other); + return other instanceof ListAttachmentsRequest && equalTo((ListAttachmentsRequest) other); } @JsonAnyGetter @@ -60,13 +46,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(InsertPagesRequest other) { - return documentPassword.equals(other.documentPassword) && idempotencyKey.equals(other.idempotencyKey); + private boolean equalTo(ListAttachmentsRequest other) { + return documentPassword.equals(other.documentPassword); } @java.lang.Override public int hashCode() { - return Objects.hash(this.documentPassword, this.idempotencyKey); + return Objects.hash(this.documentPassword); } @java.lang.Override @@ -82,16 +68,13 @@ public static Builder builder() { public static final class Builder { private Optional documentPassword = Optional.empty(); - private Optional idempotencyKey = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(InsertPagesRequest other) { + public Builder from(ListAttachmentsRequest other) { documentPassword(other.getDocumentPassword()); - idempotencyKey(other.getIdempotencyKey()); return this; } @@ -108,21 +91,8 @@ public Builder documentPassword(String documentPassword) { return this; } - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - public Builder idempotencyKey(Optional idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = Optional.ofNullable(idempotencyKey); - return this; - } - - public InsertPagesRequest build() { - return new InsertPagesRequest(documentPassword, idempotencyKey, additionalProperties); + public ListAttachmentsRequest build() { + return new ListAttachmentsRequest(documentPassword, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/resources/doc/outline/AsyncOutlineClient.java b/src/main/java/api/resources/doc/outline/AsyncOutlineClient.java new file mode 100644 index 0000000..92b8129 --- /dev/null +++ b/src/main/java/api/resources/doc/outline/AsyncOutlineClient.java @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.outline; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.resources.doc.outline.requests.GetOutlineRequest; +import com.cloudpdf.api.types.DocumentOutline; +import java.util.concurrent.CompletableFuture; + +public class AsyncOutlineClient { + protected final ClientOptions clientOptions; + + private final AsyncRawOutlineClient rawClient; + + public AsyncOutlineClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawOutlineClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawOutlineClient withRawResponse() { + return this.rawClient; + } + + public CompletableFuture get(String docId, String layerName) { + return this.rawClient.get(docId, layerName).thenApply(response -> response.body()); + } + + public CompletableFuture get(String docId, String layerName, RequestOptions requestOptions) { + return this.rawClient.get(docId, layerName, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture get(String docId, String layerName, GetOutlineRequest request) { + return this.rawClient.get(docId, layerName, request).thenApply(response -> response.body()); + } + + public CompletableFuture get( + String docId, String layerName, GetOutlineRequest request, RequestOptions requestOptions) { + return this.rawClient.get(docId, layerName, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/api/resources/doc/outline/AsyncRawOutlineClient.java b/src/main/java/api/resources/doc/outline/AsyncRawOutlineClient.java new file mode 100644 index 0000000..6d8e044 --- /dev/null +++ b/src/main/java/api/resources/doc/outline/AsyncRawOutlineClient.java @@ -0,0 +1,127 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.outline; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.CloudPDFApiException; +import com.cloudpdf.api.core.CloudPDFClientHttpResponse; +import com.cloudpdf.api.core.CloudPDFException; +import com.cloudpdf.api.core.ObjectMappers; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.core.RetryInterceptor; +import com.cloudpdf.api.errors.NotFoundError; +import com.cloudpdf.api.resources.doc.outline.requests.GetOutlineRequest; +import com.cloudpdf.api.types.DocumentOutline; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawOutlineClient { + protected final ClientOptions clientOptions; + + public AsyncRawOutlineClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public CompletableFuture> get(String docId, String layerName) { + return get(docId, layerName, GetOutlineRequest.builder().build()); + } + + public CompletableFuture> get( + String docId, String layerName, RequestOptions requestOptions) { + return get(docId, layerName, GetOutlineRequest.builder().build(), requestOptions); + } + + public CompletableFuture> get( + String docId, String layerName, GetOutlineRequest request) { + return get(docId, layerName, request, null); + } + + public CompletableFuture> get( + String docId, String layerName, GetOutlineRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("outline"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new CloudPDFClientHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocumentOutline.class), + response)); + return; + } + try { + if (response.code() == 404) { + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/api/resources/doc/outline/OutlineClient.java b/src/main/java/api/resources/doc/outline/OutlineClient.java new file mode 100644 index 0000000..5a14ba0 --- /dev/null +++ b/src/main/java/api/resources/doc/outline/OutlineClient.java @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.outline; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.resources.doc.outline.requests.GetOutlineRequest; +import com.cloudpdf.api.types.DocumentOutline; + +public class OutlineClient { + protected final ClientOptions clientOptions; + + private final RawOutlineClient rawClient; + + public OutlineClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawOutlineClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawOutlineClient withRawResponse() { + return this.rawClient; + } + + public DocumentOutline get(String docId, String layerName) { + return this.rawClient.get(docId, layerName).body(); + } + + public DocumentOutline get(String docId, String layerName, RequestOptions requestOptions) { + return this.rawClient.get(docId, layerName, requestOptions).body(); + } + + public DocumentOutline get(String docId, String layerName, GetOutlineRequest request) { + return this.rawClient.get(docId, layerName, request).body(); + } + + public DocumentOutline get( + String docId, String layerName, GetOutlineRequest request, RequestOptions requestOptions) { + return this.rawClient.get(docId, layerName, request, requestOptions).body(); + } +} diff --git a/src/main/java/api/resources/doc/outline/RawOutlineClient.java b/src/main/java/api/resources/doc/outline/RawOutlineClient.java new file mode 100644 index 0000000..a994b6a --- /dev/null +++ b/src/main/java/api/resources/doc/outline/RawOutlineClient.java @@ -0,0 +1,106 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.outline; + +import com.cloudpdf.api.core.ClientOptions; +import com.cloudpdf.api.core.CloudPDFApiException; +import com.cloudpdf.api.core.CloudPDFClientHttpResponse; +import com.cloudpdf.api.core.CloudPDFException; +import com.cloudpdf.api.core.ObjectMappers; +import com.cloudpdf.api.core.RequestOptions; +import com.cloudpdf.api.core.RetryInterceptor; +import com.cloudpdf.api.errors.NotFoundError; +import com.cloudpdf.api.resources.doc.outline.requests.GetOutlineRequest; +import com.cloudpdf.api.types.DocumentOutline; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawOutlineClient { + protected final ClientOptions clientOptions; + + public RawOutlineClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public CloudPDFClientHttpResponse get(String docId, String layerName) { + return get(docId, layerName, GetOutlineRequest.builder().build()); + } + + public CloudPDFClientHttpResponse get( + String docId, String layerName, RequestOptions requestOptions) { + return get(docId, layerName, GetOutlineRequest.builder().build(), requestOptions); + } + + public CloudPDFClientHttpResponse get(String docId, String layerName, GetOutlineRequest request) { + return get(docId, layerName, request, null); + } + + public CloudPDFClientHttpResponse get( + String docId, String layerName, GetOutlineRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v1/docs") + .addPathSegment(docId) + .addPathSegments("layers") + .addPathSegment(layerName) + .addPathSegments("outline"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + if (request.getDocumentPassword().isPresent()) { + _requestBuilder.addHeader( + "X-Document-Password", request.getDocumentPassword().get()); + } + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new CloudPDFClientHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocumentOutline.class), response); + } + try { + if (response.code() == 404) { + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new CloudPDFApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new CloudPDFException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/api/resources/doc/outline/requests/GetOutlineRequest.java b/src/main/java/api/resources/doc/outline/requests/GetOutlineRequest.java new file mode 100644 index 0000000..dc24ac9 --- /dev/null +++ b/src/main/java/api/resources/doc/outline/requests/GetOutlineRequest.java @@ -0,0 +1,108 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.resources.doc.outline.requests; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetOutlineRequest.Builder.class) +public final class GetOutlineRequest { + private final Optional documentPassword; + + private final Map additionalProperties; + + private GetOutlineRequest(Optional documentPassword, Map additionalProperties) { + this.documentPassword = documentPassword; + this.additionalProperties = additionalProperties; + } + + /** + * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. + */ + @JsonIgnore + public Optional getDocumentPassword() { + return documentPassword; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetOutlineRequest && equalTo((GetOutlineRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetOutlineRequest other) { + return documentPassword.equals(other.documentPassword); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.documentPassword); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional documentPassword = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GetOutlineRequest other) { + documentPassword(other.getDocumentPassword()); + return this; + } + + /** + *

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

+ */ + public Builder documentPassword(Optional documentPassword) { + this.documentPassword = documentPassword; + return this; + } + + public Builder documentPassword(String documentPassword) { + this.documentPassword = Optional.ofNullable(documentPassword); + return this; + } + + public GetOutlineRequest build() { + return new GetOutlineRequest(documentPassword, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/resources/doc/pages/AsyncPagesClient.java b/src/main/java/api/resources/doc/pages/AsyncPagesClient.java index eeb59f7..adf7f55 100644 --- a/src/main/java/api/resources/doc/pages/AsyncPagesClient.java +++ b/src/main/java/api/resources/doc/pages/AsyncPagesClient.java @@ -5,32 +5,20 @@ import com.cloudpdf.api.core.ClientOptions; import com.cloudpdf.api.core.RequestOptions; -import com.cloudpdf.api.resources.doc.pages.requests.DeletePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.DocPagesReorderRequest; import com.cloudpdf.api.resources.doc.pages.requests.DocPagesSetScaleRequest; import com.cloudpdf.api.resources.doc.pages.requests.ExtractPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.FlattenPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.ViewportsPagesRequest; -import com.cloudpdf.api.types.DocPagesDelete200Response; import com.cloudpdf.api.types.DocPagesFlatten200Response; -import com.cloudpdf.api.types.DocPagesInsert200Response; -import com.cloudpdf.api.types.DocPagesInsertBlank200Response; import com.cloudpdf.api.types.DocPagesRemoveName200Response; -import com.cloudpdf.api.types.DocPagesReorder200Response; -import com.cloudpdf.api.types.DocPagesRotate200Response; import com.cloudpdf.api.types.DocPagesSetName200Response; import com.cloudpdf.api.types.DocPagesSetScale200Response; import com.cloudpdf.api.types.DocPagesViewports200Response; -import java.io.File; import java.io.InputStream; import java.util.Map; import java.util.concurrent.CompletableFuture; -import okhttp3.MediaType; public class AsyncPagesClient { protected final ClientOptions clientOptions; @@ -92,35 +80,15 @@ public CompletableFuture viewports( .thenApply(response -> response.body()); } - public CompletableFuture delete( - String docId, String layerName, Map body) { - return this.rawClient.delete(docId, layerName, body).thenApply(response -> response.body()); - } - - public CompletableFuture delete( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient.delete(docId, layerName, body, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete( - String docId, String layerName, DeletePagesRequest request) { - return this.rawClient.delete(docId, layerName, request).thenApply(response -> response.body()); - } - - public CompletableFuture delete( - String docId, String layerName, DeletePagesRequest request, RequestOptions requestOptions) { - return this.rawClient.delete(docId, layerName, request, requestOptions).thenApply(response -> response.body()); - } - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public CompletableFuture extract(String docId, String layerName, Map body) { return this.rawClient.extract(docId, layerName, body).thenApply(response -> response.body()); } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public CompletableFuture extract( String docId, String layerName, Map body, RequestOptions requestOptions) { @@ -128,14 +96,14 @@ public CompletableFuture extract( } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public CompletableFuture extract(String docId, String layerName, ExtractPagesRequest request) { return this.rawClient.extract(docId, layerName, request).thenApply(response -> response.body()); } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public CompletableFuture extract( String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { @@ -162,91 +130,6 @@ public CompletableFuture flatten( return this.rawClient.flatten(docId, layerName, request, requestOptions).thenApply(response -> response.body()); } - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CompletableFuture insert( - String docId, String layerName, File file, InsertPagesRequest request) { - return this.rawClient.insert(docId, layerName, file, request).thenApply(response -> response.body()); - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CompletableFuture insert( - String docId, String layerName, File file, InsertPagesRequest request, RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, file, request, requestOptions) - .thenApply(response -> response.body()); - } - - public CompletableFuture insert( - String docId, String layerName, InputStream stream, String filename) { - return this.rawClient.insert(docId, layerName, stream, filename).thenApply(response -> response.body()); - } - - public CompletableFuture insert( - String docId, String layerName, InputStream stream, String filename, MediaType mediaType) { - return this.rawClient - .insert(docId, layerName, stream, filename, mediaType) - .thenApply(response -> response.body()); - } - - public CompletableFuture insert( - String docId, String layerName, InputStream stream, String filename, RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, stream, filename, requestOptions) - .thenApply(response -> response.body()); - } - - public CompletableFuture insert( - String docId, - String layerName, - InputStream stream, - String filename, - MediaType mediaType, - RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, stream, filename, mediaType, requestOptions) - .thenApply(response -> response.body()); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public CompletableFuture insertBlank( - String docId, String layerName, Map body) { - return this.rawClient.insertBlank(docId, layerName, body).thenApply(response -> response.body()); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public CompletableFuture insertBlank( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient - .insertBlank(docId, layerName, body, requestOptions) - .thenApply(response -> response.body()); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public CompletableFuture insertBlank( - String docId, String layerName, InsertBlankPagesRequest request) { - return this.rawClient.insertBlank(docId, layerName, request).thenApply(response -> response.body()); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public CompletableFuture insertBlank( - String docId, String layerName, InsertBlankPagesRequest request, RequestOptions requestOptions) { - return this.rawClient - .insertBlank(docId, layerName, request, requestOptions) - .thenApply(response -> response.body()); - } - public CompletableFuture setName( String docId, String layerName, Map body) { return this.rawClient.setName(docId, layerName, body).thenApply(response -> response.body()); @@ -288,34 +171,4 @@ public CompletableFuture removeName( .removeName(docId, layerName, request, requestOptions) .thenApply(response -> response.body()); } - - public CompletableFuture reorder( - String docId, String layerName, DocPagesReorderRequest request) { - return this.rawClient.reorder(docId, layerName, request).thenApply(response -> response.body()); - } - - public CompletableFuture reorder( - String docId, String layerName, DocPagesReorderRequest request, RequestOptions requestOptions) { - return this.rawClient.reorder(docId, layerName, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture rotate( - String docId, String layerName, Map body) { - return this.rawClient.rotate(docId, layerName, body).thenApply(response -> response.body()); - } - - public CompletableFuture rotate( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient.rotate(docId, layerName, body, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture rotate( - String docId, String layerName, RotatePagesRequest request) { - return this.rawClient.rotate(docId, layerName, request).thenApply(response -> response.body()); - } - - public CompletableFuture rotate( - String docId, String layerName, RotatePagesRequest request, RequestOptions requestOptions) { - return this.rawClient.rotate(docId, layerName, request, requestOptions).thenApply(response -> response.body()); - } } diff --git a/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java b/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java index e43dffd..2368795 100644 --- a/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java +++ b/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java @@ -7,7 +7,6 @@ import com.cloudpdf.api.core.CloudPDFApiException; import com.cloudpdf.api.core.CloudPDFClientHttpResponse; import com.cloudpdf.api.core.CloudPDFException; -import com.cloudpdf.api.core.FileStream; import com.cloudpdf.api.core.MediaTypes; import com.cloudpdf.api.core.ObjectMappers; import com.cloudpdf.api.core.RequestOptions; @@ -15,40 +14,26 @@ import com.cloudpdf.api.core.RetryInterceptor; import com.cloudpdf.api.errors.BadRequestError; import com.cloudpdf.api.errors.NotFoundError; -import com.cloudpdf.api.resources.doc.pages.requests.DeletePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.DocPagesReorderRequest; import com.cloudpdf.api.resources.doc.pages.requests.DocPagesSetScaleRequest; import com.cloudpdf.api.resources.doc.pages.requests.ExtractPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.FlattenPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.ViewportsPagesRequest; -import com.cloudpdf.api.types.DocPagesDelete200Response; import com.cloudpdf.api.types.DocPagesFlatten200Response; -import com.cloudpdf.api.types.DocPagesInsert200Response; -import com.cloudpdf.api.types.DocPagesInsertBlank200Response; import com.cloudpdf.api.types.DocPagesRemoveName200Response; -import com.cloudpdf.api.types.DocPagesReorder200Response; -import com.cloudpdf.api.types.DocPagesRotate200Response; import com.cloudpdf.api.types.DocPagesSetName200Response; import com.cloudpdf.api.types.DocPagesSetScale200Response; import com.cloudpdf.api.types.DocPagesViewports200Response; import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Files; import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Headers; import okhttp3.HttpUrl; -import okhttp3.MediaType; -import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; @@ -274,816 +259,37 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> delete( - String docId, String layerName, Map body) { - return delete(docId, layerName, DeletePagesRequest.builder().body(body).build()); - } - - public CompletableFuture> delete( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return delete(docId, layerName, DeletePagesRequest.builder().body(body).build(), requestOptions); - } - - public CompletableFuture> delete( - String docId, String layerName, DeletePagesRequest request) { - return delete(docId, layerName, request, null); - } - - public CompletableFuture> delete( - String docId, String layerName, DeletePagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("delete"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesDelete200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CompletableFuture> extract( - String docId, String layerName, Map body) { - return extract( - docId, layerName, ExtractPagesRequest.builder().body(body).build()); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CompletableFuture> extract( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return extract( - docId, layerName, ExtractPagesRequest.builder().body(body).build(), requestOptions); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CompletableFuture> extract( - String docId, String layerName, ExtractPagesRequest request) { - return extract(docId, layerName, request, null); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CompletableFuture> extract( - String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("extract"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try { - ResponseBody responseBody = response.body(); - if (response.isSuccessful()) { - future.complete( - new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response)); - return; - } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> flatten( - String docId, String layerName, Map body) { - return flatten( - docId, layerName, FlattenPagesRequest.builder().body(body).build()); - } - - public CompletableFuture> flatten( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return flatten( - docId, layerName, FlattenPagesRequest.builder().body(body).build(), requestOptions); - } - - public CompletableFuture> flatten( - String docId, String layerName, FlattenPagesRequest request) { - return flatten(docId, layerName, request, null); - } - - public CompletableFuture> flatten( - String docId, String layerName, FlattenPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("flatten"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesFlatten200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CompletableFuture> insert( - String docId, String layerName, File file, InsertPagesRequest request) { - return insert(docId, layerName, file, request, null); - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CompletableFuture> insert( - String docId, String layerName, File file, InsertPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - try { - String fileMimeType = Files.probeContentType(file.toPath()); - MediaType fileMimeTypeMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null; - multipartBodyBuilder.addFormDataPart( - "file", file.getName(), RequestBody.create(file, fileMimeTypeMediaType)); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", multipartBodyBuilder.build()) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsert200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> insert( - String docId, String layerName, InputStream stream, String filename) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsert200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> insert( - String docId, String layerName, InputStream stream, String filename, MediaType mediaType) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsert200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> insert( - String docId, String layerName, InputStream stream, String filename, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsert200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> insert( - String docId, - String layerName, - InputStream stream, - String filename, - MediaType mediaType, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsert200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; - } - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CompletableFuture> insertBlank( + public CompletableFuture> extract( String docId, String layerName, Map body) { - return insertBlank( - docId, layerName, InsertBlankPagesRequest.builder().body(body).build()); + return extract( + docId, layerName, ExtractPagesRequest.builder().body(body).build()); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CompletableFuture> insertBlank( + public CompletableFuture> extract( String docId, String layerName, Map body, RequestOptions requestOptions) { - return insertBlank( - docId, layerName, InsertBlankPagesRequest.builder().body(body).build(), requestOptions); + return extract( + docId, layerName, ExtractPagesRequest.builder().body(body).build(), requestOptions); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CompletableFuture> insertBlank( - String docId, String layerName, InsertBlankPagesRequest request) { - return insertBlank(docId, layerName, request, null); + public CompletableFuture> extract( + String docId, String layerName, ExtractPagesRequest request) { + return extract(docId, layerName, request, null); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CompletableFuture> insertBlank( - String docId, String layerName, InsertBlankPagesRequest request, RequestOptions requestOptions) { + public CompletableFuture> extract( + String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -1091,7 +297,7 @@ public CompletableFuture { httpUrl.addQueryParameter(_key, _value); @@ -1114,10 +320,6 @@ public CompletableFuture> future = - new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesInsertBlank200Response.class), - response)); + future.complete( + new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response)); return; } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; try { switch (response.code()) { case 400: @@ -1182,25 +382,25 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> setName( + public CompletableFuture> flatten( String docId, String layerName, Map body) { - return setName( - docId, layerName, SetNamePagesRequest.builder().body(body).build()); + return flatten( + docId, layerName, FlattenPagesRequest.builder().body(body).build()); } - public CompletableFuture> setName( + public CompletableFuture> flatten( String docId, String layerName, Map body, RequestOptions requestOptions) { - return setName( - docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions); + return flatten( + docId, layerName, FlattenPagesRequest.builder().body(body).build(), requestOptions); } - public CompletableFuture> setName( - String docId, String layerName, SetNamePagesRequest request) { - return setName(docId, layerName, request, null); + public CompletableFuture> flatten( + String docId, String layerName, FlattenPagesRequest request) { + return flatten(docId, layerName, request, null); } - public CompletableFuture> setName( - String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) { + public CompletableFuture> flatten( + String docId, String layerName, FlattenPagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -1208,7 +408,7 @@ public CompletableFuture> .addPathSegments("layers") .addPathSegment(layerName) .addPathSegments("pages") - .addPathSegments("names"); + .addPathSegments("flatten"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1249,7 +449,7 @@ public CompletableFuture> requestOptions.getMaxRetries().get())) .build(); } - CompletableFuture> future = new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { @@ -1258,7 +458,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO if (response.isSuccessful()) { future.complete(new CloudPDFClientHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesSetName200Response.class), + responseBodyString, DocPagesFlatten200Response.class), response)); return; } @@ -1298,129 +498,25 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> removeName( + public CompletableFuture> setName( String docId, String layerName, Map body) { - return removeName( - docId, layerName, RemoveNamePagesRequest.builder().body(body).build()); + return setName( + docId, layerName, SetNamePagesRequest.builder().body(body).build()); } - public CompletableFuture> removeName( + public CompletableFuture> setName( String docId, String layerName, Map body, RequestOptions requestOptions) { - return removeName( - docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions); - } - - public CompletableFuture> removeName( - String docId, String layerName, RemoveNamePagesRequest request) { - return removeName(docId, layerName, request, null); - } - - public CompletableFuture> removeName( - String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages/names") - .addPathSegments("delete"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesRemoveName200Response.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e)); - } catch (IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e)); - } - }); - return future; + return setName( + docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions); } - public CompletableFuture> reorder( - String docId, String layerName, DocPagesReorderRequest request) { - return reorder(docId, layerName, request, null); + public CompletableFuture> setName( + String docId, String layerName, SetNamePagesRequest request) { + return setName(docId, layerName, request, null); } - public CompletableFuture> reorder( - String docId, String layerName, DocPagesReorderRequest request, RequestOptions requestOptions) { + public CompletableFuture> setName( + String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -1428,7 +524,7 @@ public CompletableFuture> .addPathSegments("layers") .addPathSegment(layerName) .addPathSegments("pages") - .addPathSegments("reorder"); + .addPathSegments("names"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1437,7 +533,7 @@ public CompletableFuture> RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -1469,7 +565,7 @@ public CompletableFuture> requestOptions.getMaxRetries().get())) .build(); } - CompletableFuture> future = new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { @@ -1478,7 +574,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO if (response.isSuccessful()) { future.complete(new CloudPDFClientHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesReorder200Response.class), + responseBodyString, DocPagesSetName200Response.class), response)); return; } @@ -1518,31 +614,33 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> rotate( + public CompletableFuture> removeName( String docId, String layerName, Map body) { - return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build()); + return removeName( + docId, layerName, RemoveNamePagesRequest.builder().body(body).build()); } - public CompletableFuture> rotate( + public CompletableFuture> removeName( String docId, String layerName, Map body, RequestOptions requestOptions) { - return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build(), requestOptions); + return removeName( + docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions); } - public CompletableFuture> rotate( - String docId, String layerName, RotatePagesRequest request) { - return rotate(docId, layerName, request, null); + public CompletableFuture> removeName( + String docId, String layerName, RemoveNamePagesRequest request) { + return removeName(docId, layerName, request, null); } - public CompletableFuture> rotate( - String docId, String layerName, RotatePagesRequest request, RequestOptions requestOptions) { + public CompletableFuture> removeName( + String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") .addPathSegment(docId) .addPathSegments("layers") .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("rotate"); + .addPathSegments("pages/names") + .addPathSegments("delete"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1583,7 +681,7 @@ public CompletableFuture> requestOptions.getMaxRetries().get())) .build(); } - CompletableFuture> future = new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { @@ -1592,7 +690,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO if (response.isSuccessful()) { future.complete(new CloudPDFClientHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, DocPagesRotate200Response.class), + responseBodyString, DocPagesRemoveName200Response.class), response)); return; } diff --git a/src/main/java/api/resources/doc/pages/PagesClient.java b/src/main/java/api/resources/doc/pages/PagesClient.java index 903cef0..1ffcaa8 100644 --- a/src/main/java/api/resources/doc/pages/PagesClient.java +++ b/src/main/java/api/resources/doc/pages/PagesClient.java @@ -5,31 +5,19 @@ import com.cloudpdf.api.core.ClientOptions; import com.cloudpdf.api.core.RequestOptions; -import com.cloudpdf.api.resources.doc.pages.requests.DeletePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.DocPagesReorderRequest; import com.cloudpdf.api.resources.doc.pages.requests.DocPagesSetScaleRequest; import com.cloudpdf.api.resources.doc.pages.requests.ExtractPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.FlattenPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.ViewportsPagesRequest; -import com.cloudpdf.api.types.DocPagesDelete200Response; import com.cloudpdf.api.types.DocPagesFlatten200Response; -import com.cloudpdf.api.types.DocPagesInsert200Response; -import com.cloudpdf.api.types.DocPagesInsertBlank200Response; import com.cloudpdf.api.types.DocPagesRemoveName200Response; -import com.cloudpdf.api.types.DocPagesReorder200Response; -import com.cloudpdf.api.types.DocPagesRotate200Response; import com.cloudpdf.api.types.DocPagesSetName200Response; import com.cloudpdf.api.types.DocPagesSetScale200Response; import com.cloudpdf.api.types.DocPagesViewports200Response; -import java.io.File; import java.io.InputStream; import java.util.Map; -import okhttp3.MediaType; public class PagesClient { protected final ClientOptions clientOptions; @@ -91,33 +79,15 @@ public DocPagesViewports200Response viewports( .body(); } - public DocPagesDelete200Response delete(String docId, String layerName, Map body) { - return this.rawClient.delete(docId, layerName, body).body(); - } - - public DocPagesDelete200Response delete( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient.delete(docId, layerName, body, requestOptions).body(); - } - - public DocPagesDelete200Response delete(String docId, String layerName, DeletePagesRequest request) { - return this.rawClient.delete(docId, layerName, request).body(); - } - - public DocPagesDelete200Response delete( - String docId, String layerName, DeletePagesRequest request, RequestOptions requestOptions) { - return this.rawClient.delete(docId, layerName, request, requestOptions).body(); - } - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public InputStream extract(String docId, String layerName, Map body) { return this.rawClient.extract(docId, layerName, body).body(); } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public InputStream extract( String docId, String layerName, Map body, RequestOptions requestOptions) { @@ -125,14 +95,14 @@ public InputStream extract( } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public InputStream extract(String docId, String layerName, ExtractPagesRequest request) { return this.rawClient.extract(docId, layerName, request).body(); } /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ public InputStream extract( String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { @@ -157,87 +127,6 @@ public DocPagesFlatten200Response flatten( return this.rawClient.flatten(docId, layerName, request, requestOptions).body(); } - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public DocPagesInsert200Response insert(String docId, String layerName, File file, InsertPagesRequest request) { - return this.rawClient.insert(docId, layerName, file, request).body(); - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public DocPagesInsert200Response insert( - String docId, String layerName, File file, InsertPagesRequest request, RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, file, request, requestOptions) - .body(); - } - - public DocPagesInsert200Response insert(String docId, String layerName, InputStream stream, String filename) { - return this.rawClient.insert(docId, layerName, stream, filename).body(); - } - - public DocPagesInsert200Response insert( - String docId, String layerName, InputStream stream, String filename, MediaType mediaType) { - return this.rawClient - .insert(docId, layerName, stream, filename, mediaType) - .body(); - } - - public DocPagesInsert200Response insert( - String docId, String layerName, InputStream stream, String filename, RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, stream, filename, requestOptions) - .body(); - } - - public DocPagesInsert200Response insert( - String docId, - String layerName, - InputStream stream, - String filename, - MediaType mediaType, - RequestOptions requestOptions) { - return this.rawClient - .insert(docId, layerName, stream, filename, mediaType, requestOptions) - .body(); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public DocPagesInsertBlank200Response insertBlank(String docId, String layerName, Map body) { - return this.rawClient.insertBlank(docId, layerName, body).body(); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public DocPagesInsertBlank200Response insertBlank( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient - .insertBlank(docId, layerName, body, requestOptions) - .body(); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public DocPagesInsertBlank200Response insertBlank(String docId, String layerName, InsertBlankPagesRequest request) { - return this.rawClient.insertBlank(docId, layerName, request).body(); - } - - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). - */ - public DocPagesInsertBlank200Response insertBlank( - String docId, String layerName, InsertBlankPagesRequest request, RequestOptions requestOptions) { - return this.rawClient - .insertBlank(docId, layerName, request, requestOptions) - .body(); - } - public DocPagesSetName200Response setName(String docId, String layerName, Map body) { return this.rawClient.setName(docId, layerName, body).body(); } @@ -275,31 +164,4 @@ public DocPagesRemoveName200Response removeName( .removeName(docId, layerName, request, requestOptions) .body(); } - - public DocPagesReorder200Response reorder(String docId, String layerName, DocPagesReorderRequest request) { - return this.rawClient.reorder(docId, layerName, request).body(); - } - - public DocPagesReorder200Response reorder( - String docId, String layerName, DocPagesReorderRequest request, RequestOptions requestOptions) { - return this.rawClient.reorder(docId, layerName, request, requestOptions).body(); - } - - public DocPagesRotate200Response rotate(String docId, String layerName, Map body) { - return this.rawClient.rotate(docId, layerName, body).body(); - } - - public DocPagesRotate200Response rotate( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return this.rawClient.rotate(docId, layerName, body, requestOptions).body(); - } - - public DocPagesRotate200Response rotate(String docId, String layerName, RotatePagesRequest request) { - return this.rawClient.rotate(docId, layerName, request).body(); - } - - public DocPagesRotate200Response rotate( - String docId, String layerName, RotatePagesRequest request, RequestOptions requestOptions) { - return this.rawClient.rotate(docId, layerName, request, requestOptions).body(); - } } diff --git a/src/main/java/api/resources/doc/pages/RawPagesClient.java b/src/main/java/api/resources/doc/pages/RawPagesClient.java index 44b4667..04bb077 100644 --- a/src/main/java/api/resources/doc/pages/RawPagesClient.java +++ b/src/main/java/api/resources/doc/pages/RawPagesClient.java @@ -7,7 +7,6 @@ import com.cloudpdf.api.core.CloudPDFApiException; import com.cloudpdf.api.core.CloudPDFClientHttpResponse; import com.cloudpdf.api.core.CloudPDFException; -import com.cloudpdf.api.core.FileStream; import com.cloudpdf.api.core.MediaTypes; import com.cloudpdf.api.core.ObjectMappers; import com.cloudpdf.api.core.RequestOptions; @@ -15,37 +14,23 @@ import com.cloudpdf.api.core.RetryInterceptor; import com.cloudpdf.api.errors.BadRequestError; import com.cloudpdf.api.errors.NotFoundError; -import com.cloudpdf.api.resources.doc.pages.requests.DeletePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.DocPagesReorderRequest; import com.cloudpdf.api.resources.doc.pages.requests.DocPagesSetScaleRequest; import com.cloudpdf.api.resources.doc.pages.requests.ExtractPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.FlattenPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest; -import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest; import com.cloudpdf.api.resources.doc.pages.requests.ViewportsPagesRequest; -import com.cloudpdf.api.types.DocPagesDelete200Response; import com.cloudpdf.api.types.DocPagesFlatten200Response; -import com.cloudpdf.api.types.DocPagesInsert200Response; -import com.cloudpdf.api.types.DocPagesInsertBlank200Response; import com.cloudpdf.api.types.DocPagesRemoveName200Response; -import com.cloudpdf.api.types.DocPagesReorder200Response; -import com.cloudpdf.api.types.DocPagesRotate200Response; import com.cloudpdf.api.types.DocPagesSetName200Response; import com.cloudpdf.api.types.DocPagesSetScale200Response; import com.cloudpdf.api.types.DocPagesViewports200Response; import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Files; import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; -import okhttp3.MediaType; -import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; @@ -235,663 +220,36 @@ public CloudPDFClientHttpResponse viewports( } } - public CloudPDFClientHttpResponse delete( - String docId, String layerName, Map body) { - return delete(docId, layerName, DeletePagesRequest.builder().body(body).build()); - } - - public CloudPDFClientHttpResponse delete( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return delete(docId, layerName, DeletePagesRequest.builder().body(body).build(), requestOptions); - } - - public CloudPDFClientHttpResponse delete( - String docId, String layerName, DeletePagesRequest request) { - return delete(docId, layerName, request, null); - } - - public CloudPDFClientHttpResponse delete( - String docId, String layerName, DeletePagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("delete"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesDelete200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CloudPDFClientHttpResponse extract(String docId, String layerName, Map body) { - return extract( - docId, layerName, ExtractPagesRequest.builder().body(body).build()); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CloudPDFClientHttpResponse extract( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return extract( - docId, layerName, ExtractPagesRequest.builder().body(body).build(), requestOptions); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CloudPDFClientHttpResponse extract( - String docId, String layerName, ExtractPagesRequest request) { - return extract(docId, layerName, request, null); - } - - /** - * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[]}; the response body is the new PDF. - */ - public CloudPDFClientHttpResponse extract( - String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("extract"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try { - Response response = client.newCall(okhttpRequest).execute(); - ResponseBody responseBody = response.body(); - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response); - } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - public CloudPDFClientHttpResponse flatten( - String docId, String layerName, Map body) { - return flatten( - docId, layerName, FlattenPagesRequest.builder().body(body).build()); - } - - public CloudPDFClientHttpResponse flatten( - String docId, String layerName, Map body, RequestOptions requestOptions) { - return flatten( - docId, layerName, FlattenPagesRequest.builder().body(body).build(), requestOptions); - } - - public CloudPDFClientHttpResponse flatten( - String docId, String layerName, FlattenPagesRequest request) { - return flatten(docId, layerName, request, null); - } - - public CloudPDFClientHttpResponse flatten( - String docId, String layerName, FlattenPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("flatten"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesFlatten200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CloudPDFClientHttpResponse insert( - String docId, String layerName, File file, InsertPagesRequest request) { - return insert(docId, layerName, file, request, null); - } - - /** - * Multipart: a JSON body part {"position"?: PagePosition, "resources": {"source": "<key>"}} (position omitted → the end), and the standalone PDF whose pages are copied in as the part resource:<key>. The inserted copies get fresh page object numbers, returned in insertion order. - */ - public CloudPDFClientHttpResponse insert( - String docId, String layerName, File file, InsertPagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - try { - String fileMimeType = Files.probeContentType(file.toPath()); - MediaType fileMimeTypeMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null; - multipartBodyBuilder.addFormDataPart( - "file", file.getName(), RequestBody.create(file, fileMimeTypeMediaType)); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", multipartBodyBuilder.build()) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsert200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - public CloudPDFClientHttpResponse insert( - String docId, String layerName, InputStream stream, String filename) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsert200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - public CloudPDFClientHttpResponse insert( - String docId, String layerName, InputStream stream, String filename, MediaType mediaType) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsert200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - public CloudPDFClientHttpResponse insert( - String docId, String layerName, InputStream stream, String filename, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsert200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - - public CloudPDFClientHttpResponse insert( - String docId, - String layerName, - InputStream stream, - String filename, - MediaType mediaType, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("insert"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("file", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl.build()); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsert200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } - } - /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CloudPDFClientHttpResponse insertBlank( - String docId, String layerName, Map body) { - return insertBlank( - docId, layerName, InsertBlankPagesRequest.builder().body(body).build()); + public CloudPDFClientHttpResponse extract(String docId, String layerName, Map body) { + return extract( + docId, layerName, ExtractPagesRequest.builder().body(body).build()); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CloudPDFClientHttpResponse insertBlank( + public CloudPDFClientHttpResponse extract( String docId, String layerName, Map body, RequestOptions requestOptions) { - return insertBlank( - docId, layerName, InsertBlankPagesRequest.builder().body(body).build(), requestOptions); + return extract( + docId, layerName, ExtractPagesRequest.builder().body(body).build(), requestOptions); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CloudPDFClientHttpResponse insertBlank( - String docId, String layerName, InsertBlankPagesRequest request) { - return insertBlank(docId, layerName, request, null); + public CloudPDFClientHttpResponse extract( + String docId, String layerName, ExtractPagesRequest request) { + return extract(docId, layerName, request, null); } /** - * Body is {"size": {"width", "height"}, "count"?, "position"?} — size in PDF points, count in [1, 100], position a PagePosition (omitted → the end). + * A read, not a mutation: the source document is untouched and no event is published. Body is {"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}; the response body is the new PDF. With flatten the copy is the pages as they draw for usage ("print": a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes doc.download or doc.download.flattened, and paints only what the caller may read; includeAnnotations and includeFormFields choose what it paints, and are refused without flatten. */ - public CloudPDFClientHttpResponse insertBlank( - String docId, String layerName, InsertBlankPagesRequest request, RequestOptions requestOptions) { + public CloudPDFClientHttpResponse extract( + String docId, String layerName, ExtractPagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -899,7 +257,7 @@ public CloudPDFClientHttpResponse insertBlank( .addPathSegments("layers") .addPathSegment(layerName) .addPathSegments("pages") - .addPathSegments("insert-blank"); + .addPathSegments("extract"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -922,10 +280,6 @@ public CloudPDFClientHttpResponse insertBlank( _requestBuilder.addHeader( "X-Document-Password", request.getDocumentPassword().get()); } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -940,14 +294,13 @@ public CloudPDFClientHttpResponse insertBlank( requestOptions.getMaxRetries().get())) .build(); } - try (Response response = client.newCall(okhttpRequest).execute()) { + try { + Response response = client.newCall(okhttpRequest).execute(); ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesInsertBlank200Response.class), - response); + return new CloudPDFClientHttpResponse<>(new ResponseBodyInputStream(response), response); } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; try { switch (response.code()) { case 400: @@ -970,25 +323,25 @@ public CloudPDFClientHttpResponse insertBlank( } } - public CloudPDFClientHttpResponse setName( + public CloudPDFClientHttpResponse flatten( String docId, String layerName, Map body) { - return setName( - docId, layerName, SetNamePagesRequest.builder().body(body).build()); + return flatten( + docId, layerName, FlattenPagesRequest.builder().body(body).build()); } - public CloudPDFClientHttpResponse setName( + public CloudPDFClientHttpResponse flatten( String docId, String layerName, Map body, RequestOptions requestOptions) { - return setName( - docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions); + return flatten( + docId, layerName, FlattenPagesRequest.builder().body(body).build(), requestOptions); } - public CloudPDFClientHttpResponse setName( - String docId, String layerName, SetNamePagesRequest request) { - return setName(docId, layerName, request, null); + public CloudPDFClientHttpResponse flatten( + String docId, String layerName, FlattenPagesRequest request) { + return flatten(docId, layerName, request, null); } - public CloudPDFClientHttpResponse setName( - String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) { + public CloudPDFClientHttpResponse flatten( + String docId, String layerName, FlattenPagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -996,7 +349,7 @@ public CloudPDFClientHttpResponse setName( .addPathSegments("layers") .addPathSegment(layerName) .addPathSegments("pages") - .addPathSegments("names"); + .addPathSegments("flatten"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1042,7 +395,7 @@ public CloudPDFClientHttpResponse setName( String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesSetName200Response.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesFlatten200Response.class), response); } try { @@ -1067,110 +420,25 @@ public CloudPDFClientHttpResponse setName( } } - public CloudPDFClientHttpResponse removeName( + public CloudPDFClientHttpResponse setName( String docId, String layerName, Map body) { - return removeName( - docId, layerName, RemoveNamePagesRequest.builder().body(body).build()); + return setName( + docId, layerName, SetNamePagesRequest.builder().body(body).build()); } - public CloudPDFClientHttpResponse removeName( + public CloudPDFClientHttpResponse setName( String docId, String layerName, Map body, RequestOptions requestOptions) { - return removeName( - docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions); - } - - public CloudPDFClientHttpResponse removeName( - String docId, String layerName, RemoveNamePagesRequest request) { - return removeName(docId, layerName, request, null); - } - - public CloudPDFClientHttpResponse removeName( - String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("v1/docs") - .addPathSegment(docId) - .addPathSegments("layers") - .addPathSegment(layerName) - .addPathSegments("pages/names") - .addPathSegments("delete"); - if (requestOptions != null) { - requestOptions.getQueryParameters().forEach((_key, _value) -> { - httpUrl.addQueryParameter(_key, _value); - }); - } - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getDocumentPassword().isPresent()) { - _requestBuilder.addHeader( - "X-Document-Password", request.getDocumentPassword().get()); - } - if (request.getIdempotencyKey().isPresent()) { - _requestBuilder.addHeader( - "Idempotency-Key", request.getIdempotencyKey().get()); - } - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesRemoveName200Response.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new CloudPDFApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e); - } catch (IOException e) { - throw new CloudPDFException("Network error executing HTTP request", e); - } + return setName( + docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions); } - public CloudPDFClientHttpResponse reorder( - String docId, String layerName, DocPagesReorderRequest request) { - return reorder(docId, layerName, request, null); + public CloudPDFClientHttpResponse setName( + String docId, String layerName, SetNamePagesRequest request) { + return setName(docId, layerName, request, null); } - public CloudPDFClientHttpResponse reorder( - String docId, String layerName, DocPagesReorderRequest request, RequestOptions requestOptions) { + public CloudPDFClientHttpResponse setName( + String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") @@ -1178,7 +446,7 @@ public CloudPDFClientHttpResponse reorder( .addPathSegments("layers") .addPathSegment(layerName) .addPathSegments("pages") - .addPathSegments("reorder"); + .addPathSegments("names"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1187,7 +455,7 @@ public CloudPDFClientHttpResponse reorder( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); } catch (Exception e) { throw new RuntimeException(e); } @@ -1224,7 +492,7 @@ public CloudPDFClientHttpResponse reorder( String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesReorder200Response.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesSetName200Response.class), response); } try { @@ -1249,31 +517,33 @@ public CloudPDFClientHttpResponse reorder( } } - public CloudPDFClientHttpResponse rotate( + public CloudPDFClientHttpResponse removeName( String docId, String layerName, Map body) { - return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build()); + return removeName( + docId, layerName, RemoveNamePagesRequest.builder().body(body).build()); } - public CloudPDFClientHttpResponse rotate( + public CloudPDFClientHttpResponse removeName( String docId, String layerName, Map body, RequestOptions requestOptions) { - return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build(), requestOptions); + return removeName( + docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions); } - public CloudPDFClientHttpResponse rotate( - String docId, String layerName, RotatePagesRequest request) { - return rotate(docId, layerName, request, null); + public CloudPDFClientHttpResponse removeName( + String docId, String layerName, RemoveNamePagesRequest request) { + return removeName(docId, layerName, request, null); } - public CloudPDFClientHttpResponse rotate( - String docId, String layerName, RotatePagesRequest request, RequestOptions requestOptions) { + public CloudPDFClientHttpResponse removeName( + String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/docs") .addPathSegment(docId) .addPathSegments("layers") .addPathSegment(layerName) - .addPathSegments("pages") - .addPathSegments("rotate"); + .addPathSegments("pages/names") + .addPathSegments("delete"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -1319,7 +589,7 @@ public CloudPDFClientHttpResponse rotate( String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { return new CloudPDFClientHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesRotate200Response.class), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesRemoveName200Response.class), response); } try { diff --git a/src/main/java/api/resources/doc/pages/requests/DocPagesReorderRequest.java b/src/main/java/api/resources/doc/pages/requests/DocPagesReorderRequest.java deleted file mode 100644 index 06e2201..0000000 --- a/src/main/java/api/resources/doc/pages/requests/DocPagesReorderRequest.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.resources.doc.pages.requests; - -import com.cloudpdf.api.core.ObjectMappers; -import com.cloudpdf.api.types.PagePosition; -import com.cloudpdf.api.types.PageRef; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorderRequest.Builder.class) -public final class DocPagesReorderRequest { - private final Optional documentPassword; - - private final Optional idempotencyKey; - - private final List pages; - - private final PagePosition position; - - private final Map additionalProperties; - - private DocPagesReorderRequest( - Optional documentPassword, - Optional idempotencyKey, - List pages, - PagePosition position, - Map additionalProperties) { - this.documentPassword = documentPassword; - this.idempotencyKey = idempotencyKey; - this.pages = pages; - this.position = position; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. - */ - @JsonIgnore - public Optional getDocumentPassword() { - return documentPassword; - } - - /** - * @return Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - */ - @JsonIgnore - public Optional getIdempotencyKey() { - return idempotencyKey; - } - - @JsonProperty("pages") - public List getPages() { - return pages; - } - - @JsonProperty("position") - public PagePosition getPosition() { - return position; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesReorderRequest && equalTo((DocPagesReorderRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesReorderRequest other) { - return documentPassword.equals(other.documentPassword) - && idempotencyKey.equals(other.idempotencyKey) - && pages.equals(other.pages) - && position.equals(other.position); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.documentPassword, this.idempotencyKey, this.pages, this.position); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PositionStage builder() { - return new Builder(); - } - - public interface PositionStage { - _FinalStage position(@NotNull PagePosition position); - - Builder from(DocPagesReorderRequest other); - } - - public interface _FinalStage { - DocPagesReorderRequest build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

- */ - _FinalStage documentPassword(Optional documentPassword); - - _FinalStage documentPassword(String documentPassword); - - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - _FinalStage idempotencyKey(Optional idempotencyKey); - - _FinalStage idempotencyKey(String idempotencyKey); - - _FinalStage pages(List pages); - - _FinalStage addPages(PageRef pages); - - _FinalStage addAllPages(List pages); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PositionStage, _FinalStage { - private PagePosition position; - - private List pages = new ArrayList<>(); - - private Optional idempotencyKey = Optional.empty(); - - private Optional documentPassword = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesReorderRequest other) { - documentPassword(other.getDocumentPassword()); - idempotencyKey(other.getIdempotencyKey()); - pages(other.getPages()); - position(other.getPosition()); - return this; - } - - @java.lang.Override - @JsonSetter("position") - public _FinalStage position(@NotNull PagePosition position) { - this.position = Objects.requireNonNull(position, "position must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage addAllPages(List pages) { - if (pages != null) { - this.pages.addAll(pages); - } - return this; - } - - @java.lang.Override - public _FinalStage addPages(PageRef pages) { - this.pages.add(pages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { - this.pages.clear(); - if (pages != null) { - this.pages.addAll(pages); - } - return this; - } - - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage idempotencyKey(String idempotencyKey) { - this.idempotencyKey = Optional.ofNullable(idempotencyKey); - return this; - } - - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - @java.lang.Override - public _FinalStage idempotencyKey(Optional idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - *

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage documentPassword(String documentPassword) { - this.documentPassword = Optional.ofNullable(documentPassword); - return this; - } - - /** - *

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

- */ - @java.lang.Override - public _FinalStage documentPassword(Optional documentPassword) { - this.documentPassword = documentPassword; - return this; - } - - @java.lang.Override - public DocPagesReorderRequest build() { - return new DocPagesReorderRequest(documentPassword, idempotencyKey, pages, position, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/resources/doc/pages/requests/InsertBlankPagesRequest.java b/src/main/java/api/resources/doc/pages/requests/InsertBlankPagesRequest.java deleted file mode 100644 index 0e8cdc4..0000000 --- a/src/main/java/api/resources/doc/pages/requests/InsertBlankPagesRequest.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.resources.doc.pages.requests; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InsertBlankPagesRequest.Builder.class) -public final class InsertBlankPagesRequest { - private final Optional documentPassword; - - private final Optional idempotencyKey; - - private final Map body; - - private final Map additionalProperties; - - private InsertBlankPagesRequest( - Optional documentPassword, - Optional idempotencyKey, - Map body, - Map additionalProperties) { - this.documentPassword = documentPassword; - this.idempotencyKey = idempotencyKey; - this.body = body; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. - */ - @JsonIgnore - public Optional getDocumentPassword() { - return documentPassword; - } - - /** - * @return Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. - */ - @JsonIgnore - public Optional getIdempotencyKey() { - return idempotencyKey; - } - - @JsonProperty("body") - public Map getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InsertBlankPagesRequest && equalTo((InsertBlankPagesRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(InsertBlankPagesRequest other) { - return documentPassword.equals(other.documentPassword) - && idempotencyKey.equals(other.idempotencyKey) - && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.documentPassword, this.idempotencyKey, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional documentPassword = Optional.empty(); - - private Optional idempotencyKey = Optional.empty(); - - private Map body = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(InsertBlankPagesRequest other) { - documentPassword(other.getDocumentPassword()); - idempotencyKey(other.getIdempotencyKey()); - body(other.getBody()); - return this; - } - - /** - *

Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

- */ - public Builder documentPassword(Optional documentPassword) { - this.documentPassword = documentPassword; - return this; - } - - public Builder documentPassword(String documentPassword) { - this.documentPassword = Optional.ofNullable(documentPassword); - return this; - } - - /** - *

Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing.

- */ - public Builder idempotencyKey(Optional idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = Optional.ofNullable(idempotencyKey); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Map body) { - this.body.clear(); - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder putAllBody(Map body) { - if (body != null) { - this.body.putAll(body); - } - return this; - } - - public Builder body(String key, Object value) { - this.body.put(key, value); - return this; - } - - public InsertBlankPagesRequest build() { - return new InsertBlankPagesRequest(documentPassword, idempotencyKey, body, additionalProperties); - } - - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/AnnotationFileAttachment.java b/src/main/java/api/types/AnnotationFileAttachment.java index 71b81fe..7fbdbde 100644 --- a/src/main/java/api/types/AnnotationFileAttachment.java +++ b/src/main/java/api/types/AnnotationFileAttachment.java @@ -91,7 +91,7 @@ public final class AnnotationFileAttachment { private final AnnotationFileAttachmentIcon icon; - private final Optional file; + private final Optional file; private final Map additionalProperties; @@ -129,7 +129,7 @@ private AnnotationFileAttachment( String color, double opacity, AnnotationFileAttachmentIcon icon, - Optional file, + Optional file, Map additionalProperties) { this.ref = ref; this.page = page; @@ -379,7 +379,7 @@ public AnnotationFileAttachmentIcon getIcon() { } @JsonIgnore - public Optional getFile() { + public Optional getFile() { if (file == null) { return Optional.empty(); } @@ -478,7 +478,7 @@ private Optional _getActions() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("file") - private Optional _getFile() { + private Optional _getFile() { return file; } @@ -749,11 +749,11 @@ public interface _FinalStage { _FinalStage actions(Nullable actions); - _FinalStage file(Optional file); + _FinalStage file(Optional file); - _FinalStage file(AnnotationFileAttachmentFile file); + _FinalStage file(AttachmentFileInfo file); - _FinalStage file(Nullable file); + _FinalStage file(Nullable file); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -813,7 +813,7 @@ public static final class Builder private AnnotationFileAttachmentIcon icon; - private Optional file = Optional.empty(); + private Optional file = Optional.empty(); private Optional actions = Optional.empty(); @@ -1016,7 +1016,7 @@ public _FinalStage icon(@NotNull AnnotationFileAttachmentIcon icon) { } @java.lang.Override - public _FinalStage file(Nullable file) { + public _FinalStage file(Nullable file) { if (file.isNull()) { this.file = null; } else if (file.isEmpty()) { @@ -1028,14 +1028,14 @@ public _FinalStage file(Nullable file) { } @java.lang.Override - public _FinalStage file(AnnotationFileAttachmentFile file) { + public _FinalStage file(AttachmentFileInfo file) { this.file = Optional.ofNullable(file); return this; } @java.lang.Override @JsonSetter(value = "file", nulls = Nulls.SKIP) - public _FinalStage file(Optional file) { + public _FinalStage file(Optional file) { this.file = file; return this; } diff --git a/src/main/java/api/types/Attachment.java b/src/main/java/api/types/Attachment.java new file mode 100644 index 0000000..cbf6d27 --- /dev/null +++ b/src/main/java/api/types/Attachment.java @@ -0,0 +1,511 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Attachment.Builder.class) +public final class Attachment { + private final AttachmentRef ref; + + private final String name; + + private final Optional mimeType; + + private final Optional description; + + private final Optional size; + + private final Optional checksum; + + private final Optional createdAt; + + private final Optional modifiedAt; + + private final int index; + + private final Map additionalProperties; + + private Attachment( + AttachmentRef ref, + String name, + Optional mimeType, + Optional description, + Optional size, + Optional checksum, + Optional createdAt, + Optional modifiedAt, + int index, + Map additionalProperties) { + this.ref = ref; + this.name = name; + this.mimeType = mimeType; + this.description = description; + this.size = size; + this.checksum = checksum; + this.createdAt = createdAt; + this.modifiedAt = modifiedAt; + this.index = index; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("ref") + public AttachmentRef getRef() { + return ref; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonIgnore + public Optional getMimeType() { + if (mimeType == null) { + return Optional.empty(); + } + return mimeType; + } + + @JsonIgnore + public Optional getDescription() { + if (description == null) { + return Optional.empty(); + } + return description; + } + + @JsonIgnore + public Optional getSize() { + if (size == null) { + return Optional.empty(); + } + return size; + } + + @JsonIgnore + public Optional getChecksum() { + if (checksum == null) { + return Optional.empty(); + } + return checksum; + } + + @JsonIgnore + public Optional getCreatedAt() { + if (createdAt == null) { + return Optional.empty(); + } + return createdAt; + } + + @JsonIgnore + public Optional getModifiedAt() { + if (modifiedAt == null) { + return Optional.empty(); + } + return modifiedAt; + } + + @JsonProperty("index") + public int getIndex() { + return index; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("mimeType") + private Optional _getMimeType() { + return mimeType; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private Optional _getDescription() { + return description; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("size") + private Optional _getSize() { + return size; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("checksum") + private Optional _getChecksum() { + return checksum; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("createdAt") + private Optional _getCreatedAt() { + return createdAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("modifiedAt") + private Optional _getModifiedAt() { + return modifiedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Attachment && equalTo((Attachment) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Attachment other) { + return ref.equals(other.ref) + && name.equals(other.name) + && mimeType.equals(other.mimeType) + && description.equals(other.description) + && size.equals(other.size) + && checksum.equals(other.checksum) + && createdAt.equals(other.createdAt) + && modifiedAt.equals(other.modifiedAt) + && index == other.index; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.ref, + this.name, + this.mimeType, + this.description, + this.size, + this.checksum, + this.createdAt, + this.modifiedAt, + this.index); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RefStage builder() { + return new Builder(); + } + + public interface RefStage { + NameStage ref(@NotNull AttachmentRef ref); + + Builder from(Attachment other); + } + + public interface NameStage { + IndexStage name(@NotNull String name); + } + + public interface IndexStage { + _FinalStage index(int index); + } + + public interface _FinalStage { + Attachment build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage mimeType(Optional mimeType); + + _FinalStage mimeType(String mimeType); + + _FinalStage mimeType(Nullable mimeType); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage description(Nullable description); + + _FinalStage size(Optional size); + + _FinalStage size(Integer size); + + _FinalStage size(Nullable size); + + _FinalStage checksum(Optional checksum); + + _FinalStage checksum(String checksum); + + _FinalStage checksum(Nullable checksum); + + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + _FinalStage createdAt(Nullable createdAt); + + _FinalStage modifiedAt(Optional modifiedAt); + + _FinalStage modifiedAt(OffsetDateTime modifiedAt); + + _FinalStage modifiedAt(Nullable modifiedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RefStage, NameStage, IndexStage, _FinalStage { + private AttachmentRef ref; + + private String name; + + private int index; + + private Optional modifiedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional checksum = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional mimeType = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Attachment other) { + ref(other.getRef()); + name(other.getName()); + mimeType(other.getMimeType()); + description(other.getDescription()); + size(other.getSize()); + checksum(other.getChecksum()); + createdAt(other.getCreatedAt()); + modifiedAt(other.getModifiedAt()); + index(other.getIndex()); + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public NameStage ref(@NotNull AttachmentRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public IndexStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("index") + public _FinalStage index(int index) { + this.index = index; + return this; + } + + @java.lang.Override + public _FinalStage modifiedAt(Nullable modifiedAt) { + if (modifiedAt.isNull()) { + this.modifiedAt = null; + } else if (modifiedAt.isEmpty()) { + this.modifiedAt = Optional.empty(); + } else { + this.modifiedAt = Optional.of(modifiedAt.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = Optional.ofNullable(modifiedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "modifiedAt", nulls = Nulls.SKIP) + public _FinalStage modifiedAt(Optional modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + @java.lang.Override + public _FinalStage createdAt(Nullable createdAt) { + if (createdAt.isNull()) { + this.createdAt = null; + } else if (createdAt.isEmpty()) { + this.createdAt = Optional.empty(); + } else { + this.createdAt = Optional.of(createdAt.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "createdAt", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + @java.lang.Override + public _FinalStage checksum(Nullable checksum) { + if (checksum.isNull()) { + this.checksum = null; + } else if (checksum.isEmpty()) { + this.checksum = Optional.empty(); + } else { + this.checksum = Optional.of(checksum.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage checksum(String checksum) { + this.checksum = Optional.ofNullable(checksum); + return this; + } + + @java.lang.Override + @JsonSetter(value = "checksum", nulls = Nulls.SKIP) + public _FinalStage checksum(Optional checksum) { + this.checksum = checksum; + return this; + } + + @java.lang.Override + public _FinalStage size(Nullable size) { + if (size.isNull()) { + this.size = null; + } else if (size.isEmpty()) { + this.size = Optional.empty(); + } else { + this.size = Optional.of(size.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage size(Integer size) { + this.size = Optional.ofNullable(size); + return this; + } + + @java.lang.Override + @JsonSetter(value = "size", nulls = Nulls.SKIP) + public _FinalStage size(Optional size) { + this.size = size; + return this; + } + + @java.lang.Override + public _FinalStage description(Nullable description) { + if (description.isNull()) { + this.description = null; + } else if (description.isEmpty()) { + this.description = Optional.empty(); + } else { + this.description = Optional.of(description.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public _FinalStage mimeType(Nullable mimeType) { + if (mimeType.isNull()) { + this.mimeType = null; + } else if (mimeType.isEmpty()) { + this.mimeType = Optional.empty(); + } else { + this.mimeType = Optional.of(mimeType.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage mimeType(String mimeType) { + this.mimeType = Optional.ofNullable(mimeType); + return this; + } + + @java.lang.Override + @JsonSetter(value = "mimeType", nulls = Nulls.SKIP) + public _FinalStage mimeType(Optional mimeType) { + this.mimeType = mimeType; + return this; + } + + @java.lang.Override + public Attachment build() { + return new Attachment( + ref, + name, + mimeType, + description, + size, + checksum, + createdAt, + modifiedAt, + index, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItem.java b/src/main/java/api/types/AttachmentFileBase.java similarity index 51% rename from src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItem.java rename to src/main/java/api/types/AttachmentFileBase.java index b47dcdc..f63a5ea 100644 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItem.java +++ b/src/main/java/api/types/AttachmentFileBase.java @@ -10,27 +10,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutNamedPagesItem.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutNamedPagesItem { +@JsonDeserialize(builder = AttachmentFileBase.Builder.class) +public final class AttachmentFileBase { private final String name; - private final DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget target; + private final Optional mimeType; + + private final Optional description; private final Map additionalProperties; - private DocPagesInsertBlank200ResponseLayoutNamedPagesItem( + private AttachmentFileBase( String name, - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget target, + Optional mimeType, + Optional description, Map additionalProperties) { this.name = name; - this.target = target; + this.mimeType = mimeType; + this.description = description; this.additionalProperties = additionalProperties; } @@ -39,16 +45,20 @@ public String getName() { return name; } - @JsonProperty("target") - public DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget getTarget() { - return target; + @JsonProperty("mimeType") + public Optional getMimeType() { + return mimeType; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutNamedPagesItem - && equalTo((DocPagesInsertBlank200ResponseLayoutNamedPagesItem) other); + return other instanceof AttachmentFileBase && equalTo((AttachmentFileBase) other); } @JsonAnyGetter @@ -56,13 +66,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutNamedPagesItem other) { - return name.equals(other.name) && target.equals(other.target); + private boolean equalTo(AttachmentFileBase other) { + return name.equals(other.name) && mimeType.equals(other.mimeType) && description.equals(other.description); } @java.lang.Override public int hashCode() { - return Objects.hash(this.name, this.target); + return Objects.hash(this.name, this.mimeType, this.description); } @java.lang.Override @@ -75,28 +85,34 @@ public static NameStage builder() { } public interface NameStage { - TargetStage name(@NotNull String name); + _FinalStage name(@NotNull String name); - Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItem other); - } - - public interface TargetStage { - _FinalStage target(@NotNull DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget target); + Builder from(AttachmentFileBase other); } public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutNamedPagesItem build(); + AttachmentFileBase build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage mimeType(Optional mimeType); + + _FinalStage mimeType(String mimeType); + + _FinalStage description(Optional description); + + _FinalStage description(String description); } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, TargetStage, _FinalStage { + public static final class Builder implements NameStage, _FinalStage { private String name; - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget target; + private Optional description = Optional.empty(); + + private Optional mimeType = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -104,29 +120,49 @@ public static final class Builder implements NameStage, TargetStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItem other) { + public Builder from(AttachmentFileBase other) { name(other.getName()); - target(other.getTarget()); + mimeType(other.getMimeType()); + description(other.getDescription()); return this; } @java.lang.Override @JsonSetter("name") - public TargetStage name(@NotNull String name) { + public _FinalStage name(@NotNull String name) { this.name = Objects.requireNonNull(name, "name must not be null"); return this; } @java.lang.Override - @JsonSetter("target") - public _FinalStage target(@NotNull DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget target) { - this.target = Objects.requireNonNull(target, "target must not be null"); + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public _FinalStage mimeType(String mimeType) { + this.mimeType = Optional.ofNullable(mimeType); + return this; + } + + @java.lang.Override + @JsonSetter(value = "mimeType", nulls = Nulls.SKIP) + public _FinalStage mimeType(Optional mimeType) { + this.mimeType = mimeType; return this; } @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutNamedPagesItem build() { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItem(name, target, additionalProperties); + public AttachmentFileBase build() { + return new AttachmentFileBase(name, mimeType, description, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/AnnotationFileAttachmentFile.java b/src/main/java/api/types/AttachmentFileInfo.java similarity index 95% rename from src/main/java/api/types/AnnotationFileAttachmentFile.java rename to src/main/java/api/types/AttachmentFileInfo.java index 36244d3..e58346f 100644 --- a/src/main/java/api/types/AnnotationFileAttachmentFile.java +++ b/src/main/java/api/types/AttachmentFileInfo.java @@ -23,8 +23,8 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AnnotationFileAttachmentFile.Builder.class) -public final class AnnotationFileAttachmentFile { +@JsonDeserialize(builder = AttachmentFileInfo.Builder.class) +public final class AttachmentFileInfo { private final String name; private final Optional mimeType; @@ -41,7 +41,7 @@ public final class AnnotationFileAttachmentFile { private final Map additionalProperties; - private AnnotationFileAttachmentFile( + private AttachmentFileInfo( String name, Optional mimeType, Optional description, @@ -152,7 +152,7 @@ private Optional _getModifiedAt() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AnnotationFileAttachmentFile && equalTo((AnnotationFileAttachmentFile) other); + return other instanceof AttachmentFileInfo && equalTo((AttachmentFileInfo) other); } @JsonAnyGetter @@ -160,7 +160,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AnnotationFileAttachmentFile other) { + private boolean equalTo(AttachmentFileInfo other) { return name.equals(other.name) && mimeType.equals(other.mimeType) && description.equals(other.description) @@ -188,11 +188,11 @@ public static NameStage builder() { public interface NameStage { _FinalStage name(@NotNull String name); - Builder from(AnnotationFileAttachmentFile other); + Builder from(AttachmentFileInfo other); } public interface _FinalStage { - AnnotationFileAttachmentFile build(); + AttachmentFileInfo build(); _FinalStage additionalProperty(String key, Object value); @@ -257,7 +257,7 @@ public static final class Builder implements NameStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(AnnotationFileAttachmentFile other) { + public Builder from(AttachmentFileInfo other) { name(other.getName()); mimeType(other.getMimeType()); description(other.getDescription()); @@ -426,8 +426,8 @@ public _FinalStage mimeType(Optional mimeType) { } @java.lang.Override - public AnnotationFileAttachmentFile build() { - return new AnnotationFileAttachmentFile( + public AttachmentFileInfo build() { + return new AttachmentFileInfo( name, mimeType, description, size, checksum, createdAt, modifiedAt, additionalProperties); } diff --git a/src/main/java/api/types/AttachmentList.java b/src/main/java/api/types/AttachmentList.java new file mode 100644 index 0000000..621908d --- /dev/null +++ b/src/main/java/api/types/AttachmentList.java @@ -0,0 +1,116 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AttachmentList.Builder.class) +public final class AttachmentList { + private final List attachments; + + private final Map additionalProperties; + + private AttachmentList(List attachments, Map additionalProperties) { + this.attachments = attachments; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attachments") + public List getAttachments() { + return attachments; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentList && equalTo((AttachmentList) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AttachmentList other) { + return attachments.equals(other.attachments); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attachments); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private List attachments = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(AttachmentList other) { + attachments(other.getAttachments()); + return this; + } + + @JsonSetter(value = "attachments", nulls = Nulls.SKIP) + public Builder attachments(List attachments) { + this.attachments.clear(); + if (attachments != null) { + this.attachments.addAll(attachments); + } + return this; + } + + public Builder addAttachments(Attachment attachments) { + this.attachments.add(attachments); + return this; + } + + public Builder addAllAttachments(List attachments) { + if (attachments != null) { + this.attachments.addAll(attachments); + } + return this; + } + + public AttachmentList build() { + return new AttachmentList(attachments, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/AttachmentMutationMeta.java b/src/main/java/api/types/AttachmentMutationMeta.java new file mode 100644 index 0000000..e2d9f2c --- /dev/null +++ b/src/main/java/api/types/AttachmentMutationMeta.java @@ -0,0 +1,290 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AttachmentMutationMeta.Builder.class) +public final class AttachmentMutationMeta { + private final List affectedPages; + + private final Optional cacheDelta; + + private final String opId; + + private final boolean undoable; + + private final List changed; + + private final Map additionalProperties; + + private AttachmentMutationMeta( + List affectedPages, + Optional cacheDelta, + String opId, + boolean undoable, + List changed, + Map additionalProperties) { + this.affectedPages = affectedPages; + this.cacheDelta = cacheDelta; + this.opId = opId; + this.undoable = undoable; + this.changed = changed; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("affectedPages") + public List getAffectedPages() { + return affectedPages; + } + + @JsonIgnore + public Optional getCacheDelta() { + if (cacheDelta == null) { + return Optional.empty(); + } + return cacheDelta; + } + + @JsonProperty("opId") + public String getOpId() { + return opId; + } + + @JsonProperty("undoable") + public boolean getUndoable() { + return undoable; + } + + @JsonProperty("changed") + public List getChanged() { + return changed; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cacheDelta") + private Optional _getCacheDelta() { + return cacheDelta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentMutationMeta && equalTo((AttachmentMutationMeta) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AttachmentMutationMeta other) { + return affectedPages.equals(other.affectedPages) + && cacheDelta.equals(other.cacheDelta) + && opId.equals(other.opId) + && undoable == other.undoable + && changed.equals(other.changed); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.affectedPages, this.cacheDelta, this.opId, this.undoable, this.changed); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OpIdStage builder() { + return new Builder(); + } + + public interface OpIdStage { + UndoableStage opId(@NotNull String opId); + + Builder from(AttachmentMutationMeta other); + } + + public interface UndoableStage { + _FinalStage undoable(boolean undoable); + } + + public interface _FinalStage { + AttachmentMutationMeta build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage affectedPages(List affectedPages); + + _FinalStage addAffectedPages(PageRef affectedPages); + + _FinalStage addAllAffectedPages(List affectedPages); + + _FinalStage cacheDelta(Optional cacheDelta); + + _FinalStage cacheDelta(CacheDelta cacheDelta); + + _FinalStage cacheDelta(Nullable cacheDelta); + + _FinalStage changed(List changed); + + _FinalStage addChanged(AttachmentRef changed); + + _FinalStage addAllChanged(List changed); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OpIdStage, UndoableStage, _FinalStage { + private String opId; + + private boolean undoable; + + private List changed = new ArrayList<>(); + + private Optional cacheDelta = Optional.empty(); + + private List affectedPages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AttachmentMutationMeta other) { + affectedPages(other.getAffectedPages()); + cacheDelta(other.getCacheDelta()); + opId(other.getOpId()); + undoable(other.getUndoable()); + changed(other.getChanged()); + return this; + } + + @java.lang.Override + @JsonSetter("opId") + public UndoableStage opId(@NotNull String opId) { + this.opId = Objects.requireNonNull(opId, "opId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("undoable") + public _FinalStage undoable(boolean undoable) { + this.undoable = undoable; + return this; + } + + @java.lang.Override + public _FinalStage addAllChanged(List changed) { + if (changed != null) { + this.changed.addAll(changed); + } + return this; + } + + @java.lang.Override + public _FinalStage addChanged(AttachmentRef changed) { + this.changed.add(changed); + return this; + } + + @java.lang.Override + @JsonSetter(value = "changed", nulls = Nulls.SKIP) + public _FinalStage changed(List changed) { + this.changed.clear(); + if (changed != null) { + this.changed.addAll(changed); + } + return this; + } + + @java.lang.Override + public _FinalStage cacheDelta(Nullable cacheDelta) { + if (cacheDelta.isNull()) { + this.cacheDelta = null; + } else if (cacheDelta.isEmpty()) { + this.cacheDelta = Optional.empty(); + } else { + this.cacheDelta = Optional.of(cacheDelta.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage cacheDelta(CacheDelta cacheDelta) { + this.cacheDelta = Optional.ofNullable(cacheDelta); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cacheDelta", nulls = Nulls.SKIP) + public _FinalStage cacheDelta(Optional cacheDelta) { + this.cacheDelta = cacheDelta; + return this; + } + + @java.lang.Override + public _FinalStage addAllAffectedPages(List affectedPages) { + if (affectedPages != null) { + this.affectedPages.addAll(affectedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addAffectedPages(PageRef affectedPages) { + this.affectedPages.add(affectedPages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "affectedPages", nulls = Nulls.SKIP) + public _FinalStage affectedPages(List affectedPages) { + this.affectedPages.clear(); + if (affectedPages != null) { + this.affectedPages.addAll(affectedPages); + } + return this; + } + + @java.lang.Override + public AttachmentMutationMeta build() { + return new AttachmentMutationMeta(affectedPages, cacheDelta, opId, undoable, changed, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/AttachmentRef.java similarity index 56% rename from src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage.java rename to src/main/java/api/types/AttachmentRef.java index eec1734..071bfac 100644 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage.java +++ b/src/main/java/api/types/AttachmentRef.java @@ -17,28 +17,34 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage { - private final PageRef page; +@JsonDeserialize(builder = AttachmentRef.Builder.class) +public final class AttachmentRef { + private final AttachmentRefKind kind; + + private final String key; private final Map additionalProperties; - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage( - PageRef page, Map additionalProperties) { - this.page = page; + private AttachmentRef(AttachmentRefKind kind, String key, Map additionalProperties) { + this.kind = kind; + this.key = key; this.additionalProperties = additionalProperties; } - @JsonProperty("page") - public PageRef getPage() { - return page; + @JsonProperty("kind") + public AttachmentRefKind getKind() { + return kind; + } + + @JsonProperty("key") + public String getKey() { + return key; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage - && equalTo((DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage) other); + return other instanceof AttachmentRef && equalTo((AttachmentRef) other); } @JsonAnyGetter @@ -46,13 +52,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage other) { - return page.equals(other.page); + private boolean equalTo(AttachmentRef other) { + return kind.equals(other.kind) && key.equals(other.key); } @java.lang.Override public int hashCode() { - return Objects.hash(this.page); + return Objects.hash(this.kind, this.key); } @java.lang.Override @@ -60,18 +66,22 @@ public String toString() { return ObjectMappers.stringify(this); } - public static PageStage builder() { + public static KindStage builder() { return new Builder(); } - public interface PageStage { - _FinalStage page(@NotNull PageRef page); + public interface KindStage { + KeyStage kind(@NotNull AttachmentRefKind kind); + + Builder from(AttachmentRef other); + } - Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage other); + public interface KeyStage { + _FinalStage key(@NotNull String key); } public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage build(); + AttachmentRef build(); _FinalStage additionalProperty(String key, Object value); @@ -79,8 +89,10 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PageStage, _FinalStage { - private PageRef page; + public static final class Builder implements KindStage, KeyStage, _FinalStage { + private AttachmentRefKind kind; + + private String key; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -88,21 +100,29 @@ public static final class Builder implements PageStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage other) { - page(other.getPage()); + public Builder from(AttachmentRef other) { + kind(other.getKind()); + key(other.getKey()); + return this; + } + + @java.lang.Override + @JsonSetter("kind") + public KeyStage kind(@NotNull AttachmentRefKind kind) { + this.kind = Objects.requireNonNull(kind, "kind must not be null"); return this; } @java.lang.Override - @JsonSetter("page") - public _FinalStage page(@NotNull PageRef page) { - this.page = Objects.requireNonNull(page, "page must not be null"); + @JsonSetter("key") + public _FinalStage key(@NotNull String key) { + this.key = Objects.requireNonNull(key, "key must not be null"); return this; } @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage build() { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage(page, additionalProperties); + public AttachmentRef build() { + return new AttachmentRef(kind, key, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/AttachmentRefKind.java b/src/main/java/api/types/AttachmentRefKind.java new file mode 100644 index 0000000..297537c --- /dev/null +++ b/src/main/java/api/types/AttachmentRefKind.java @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class AttachmentRefKind { + public static final AttachmentRefKind KEY = new AttachmentRefKind(Value.KEY, "key"); + + private final Value value; + + private final String string; + + AttachmentRefKind(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof AttachmentRefKind && this.string.equals(((AttachmentRefKind) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case KEY: + return visitor.visitKey(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AttachmentRefKind valueOf(String value) { + switch (value) { + case "key": + return KEY; + default: + return new AttachmentRefKind(Value.UNKNOWN, value); + } + } + + public enum Value { + KEY, + + UNKNOWN + } + + public interface Visitor { + T visitKey(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/api/types/CacheDelta.java b/src/main/java/api/types/CacheDelta.java index dee7960..2dab2b2 100644 --- a/src/main/java/api/types/CacheDelta.java +++ b/src/main/java/api/types/CacheDelta.java @@ -36,6 +36,8 @@ public final class CacheDelta { private final Optional attachmentsVersion; + private final Optional outlineVersion; + private final Optional layerVersion; private final Optional working; @@ -52,6 +54,7 @@ private CacheDelta( Optional layoutVersion, Optional metadataVersion, Optional attachmentsVersion, + Optional outlineVersion, Optional layerVersion, Optional working, List pages, @@ -63,6 +66,7 @@ private CacheDelta( this.layoutVersion = layoutVersion; this.metadataVersion = metadataVersion; this.attachmentsVersion = attachmentsVersion; + this.outlineVersion = outlineVersion; this.layerVersion = layerVersion; this.working = working; this.pages = pages; @@ -104,6 +108,11 @@ public Optional getAttachmentsVersion() { return attachmentsVersion; } + @JsonProperty("outlineVersion") + public Optional getOutlineVersion() { + return outlineVersion; + } + @JsonProperty("layerVersion") public Optional getLayerVersion() { return layerVersion; @@ -138,6 +147,7 @@ private boolean equalTo(CacheDelta other) { && layoutVersion.equals(other.layoutVersion) && metadataVersion.equals(other.metadataVersion) && attachmentsVersion.equals(other.attachmentsVersion) + && outlineVersion.equals(other.outlineVersion) && layerVersion.equals(other.layerVersion) && working.equals(other.working) && pages.equals(other.pages); @@ -153,6 +163,7 @@ public int hashCode() { this.layoutVersion, this.metadataVersion, this.attachmentsVersion, + this.outlineVersion, this.layerVersion, this.working, this.pages); @@ -204,6 +215,10 @@ public interface _FinalStage { _FinalStage attachmentsVersion(Integer attachmentsVersion); + _FinalStage outlineVersion(Optional outlineVersion); + + _FinalStage outlineVersion(Integer outlineVersion); + _FinalStage layerVersion(Optional layerVersion); _FinalStage layerVersion(Integer layerVersion); @@ -231,6 +246,8 @@ public static final class Builder implements PreviousDocVersionStage, DocVersion private Optional layerVersion = Optional.empty(); + private Optional outlineVersion = Optional.empty(); + private Optional attachmentsVersion = Optional.empty(); private Optional metadataVersion = Optional.empty(); @@ -255,6 +272,7 @@ public Builder from(CacheDelta other) { layoutVersion(other.getLayoutVersion()); metadataVersion(other.getMetadataVersion()); attachmentsVersion(other.getAttachmentsVersion()); + outlineVersion(other.getOutlineVersion()); layerVersion(other.getLayerVersion()); working(other.getWorking()); pages(other.getPages()); @@ -325,6 +343,19 @@ public _FinalStage layerVersion(Optional layerVersion) { return this; } + @java.lang.Override + public _FinalStage outlineVersion(Integer outlineVersion) { + this.outlineVersion = Optional.ofNullable(outlineVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "outlineVersion", nulls = Nulls.SKIP) + public _FinalStage outlineVersion(Optional outlineVersion) { + this.outlineVersion = outlineVersion; + return this; + } + @java.lang.Override public _FinalStage attachmentsVersion(Integer attachmentsVersion) { this.attachmentsVersion = Optional.ofNullable(attachmentsVersion); @@ -400,6 +431,7 @@ public CacheDelta build() { layoutVersion, metadataVersion, attachmentsVersion, + outlineVersion, layerVersion, working, pages, diff --git a/src/main/java/api/types/ChangeItem.java b/src/main/java/api/types/ChangeItem.java index 3836c4c..aea6f2a 100644 --- a/src/main/java/api/types/ChangeItem.java +++ b/src/main/java/api/types/ChangeItem.java @@ -122,6 +122,62 @@ public static ChangeItem metadataUpdateCustom(ChangeItemMetadataUpdateCustom val return new ChangeItem(new MetadataUpdateCustomValue(value)); } + public static ChangeItem outlineCreate(ChangeItemOutlineCreate value) { + return new ChangeItem(new OutlineCreateValue(value)); + } + + public static ChangeItem outlineUpdate(ChangeItemOutlineUpdate value) { + return new ChangeItem(new OutlineUpdateValue(value)); + } + + public static ChangeItem outlineMove(ChangeItemOutlineMove value) { + return new ChangeItem(new OutlineMoveValue(value)); + } + + public static ChangeItem outlineDelete(ChangeItemOutlineDelete value) { + return new ChangeItem(new OutlineDeleteValue(value)); + } + + public static ChangeItem outlineRestore(ChangeItemOutlineRestore value) { + return new ChangeItem(new OutlineRestoreValue(value)); + } + + public static ChangeItem pagesRotate(ChangeItemPagesRotate value) { + return new ChangeItem(new PagesRotateValue(value)); + } + + public static ChangeItem pagesReorder(ChangeItemPagesReorder value) { + return new ChangeItem(new PagesReorderValue(value)); + } + + public static ChangeItem pagesDelete(ChangeItemPagesDelete value) { + return new ChangeItem(new PagesDeleteValue(value)); + } + + public static ChangeItem pagesInsertBlank(ChangeItemPagesInsertBlank value) { + return new ChangeItem(new PagesInsertBlankValue(value)); + } + + public static ChangeItem pagesInsert(ChangeItemPagesInsert value) { + return new ChangeItem(new PagesInsertValue(value)); + } + + public static ChangeItem pagesRestore(ChangeItemPagesRestore value) { + return new ChangeItem(new PagesRestoreValue(value)); + } + + public static ChangeItem attachmentsCreate(ChangeItemAttachmentsCreate value) { + return new ChangeItem(new AttachmentsCreateValue(value)); + } + + public static ChangeItem attachmentsDelete(ChangeItemAttachmentsDelete value) { + return new ChangeItem(new AttachmentsDeleteValue(value)); + } + + public static ChangeItem attachmentsRestore(ChangeItemAttachmentsRestore value) { + return new ChangeItem(new AttachmentsRestoreValue(value)); + } + public boolean isSkipped() { return value instanceof SkippedValue; } @@ -218,6 +274,62 @@ public boolean isMetadataUpdateCustom() { return value instanceof MetadataUpdateCustomValue; } + public boolean isOutlineCreate() { + return value instanceof OutlineCreateValue; + } + + public boolean isOutlineUpdate() { + return value instanceof OutlineUpdateValue; + } + + public boolean isOutlineMove() { + return value instanceof OutlineMoveValue; + } + + public boolean isOutlineDelete() { + return value instanceof OutlineDeleteValue; + } + + public boolean isOutlineRestore() { + return value instanceof OutlineRestoreValue; + } + + public boolean isPagesRotate() { + return value instanceof PagesRotateValue; + } + + public boolean isPagesReorder() { + return value instanceof PagesReorderValue; + } + + public boolean isPagesDelete() { + return value instanceof PagesDeleteValue; + } + + public boolean isPagesInsertBlank() { + return value instanceof PagesInsertBlankValue; + } + + public boolean isPagesInsert() { + return value instanceof PagesInsertValue; + } + + public boolean isPagesRestore() { + return value instanceof PagesRestoreValue; + } + + public boolean isAttachmentsCreate() { + return value instanceof AttachmentsCreateValue; + } + + public boolean isAttachmentsDelete() { + return value instanceof AttachmentsDeleteValue; + } + + public boolean isAttachmentsRestore() { + return value instanceof AttachmentsRestoreValue; + } + public boolean _isUnknown() { return value instanceof _UnknownValue; } @@ -390,6 +502,104 @@ public Optional getMetadataUpdateCustom() { return Optional.empty(); } + public Optional getOutlineCreate() { + if (isOutlineCreate()) { + return Optional.of(((OutlineCreateValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineUpdate() { + if (isOutlineUpdate()) { + return Optional.of(((OutlineUpdateValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineMove() { + if (isOutlineMove()) { + return Optional.of(((OutlineMoveValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineDelete() { + if (isOutlineDelete()) { + return Optional.of(((OutlineDeleteValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineRestore() { + if (isOutlineRestore()) { + return Optional.of(((OutlineRestoreValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesRotate() { + if (isPagesRotate()) { + return Optional.of(((PagesRotateValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesReorder() { + if (isPagesReorder()) { + return Optional.of(((PagesReorderValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesDelete() { + if (isPagesDelete()) { + return Optional.of(((PagesDeleteValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesInsertBlank() { + if (isPagesInsertBlank()) { + return Optional.of(((PagesInsertBlankValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesInsert() { + if (isPagesInsert()) { + return Optional.of(((PagesInsertValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesRestore() { + if (isPagesRestore()) { + return Optional.of(((PagesRestoreValue) value).value); + } + return Optional.empty(); + } + + public Optional getAttachmentsCreate() { + if (isAttachmentsCreate()) { + return Optional.of(((AttachmentsCreateValue) value).value); + } + return Optional.empty(); + } + + public Optional getAttachmentsDelete() { + if (isAttachmentsDelete()) { + return Optional.of(((AttachmentsDeleteValue) value).value); + } + return Optional.empty(); + } + + public Optional getAttachmentsRestore() { + if (isAttachmentsRestore()) { + return Optional.of(((AttachmentsRestoreValue) value).value); + } + return Optional.empty(); + } + public Optional _getUnknown() { if (_isUnknown()) { return Optional.of(((_UnknownValue) value).value); @@ -467,6 +677,34 @@ public interface Visitor { T visitMetadataUpdateCustom(ChangeItemMetadataUpdateCustom metadataUpdateCustom); + T visitOutlineCreate(ChangeItemOutlineCreate outlineCreate); + + T visitOutlineUpdate(ChangeItemOutlineUpdate outlineUpdate); + + T visitOutlineMove(ChangeItemOutlineMove outlineMove); + + T visitOutlineDelete(ChangeItemOutlineDelete outlineDelete); + + T visitOutlineRestore(ChangeItemOutlineRestore outlineRestore); + + T visitPagesRotate(ChangeItemPagesRotate pagesRotate); + + T visitPagesReorder(ChangeItemPagesReorder pagesReorder); + + T visitPagesDelete(ChangeItemPagesDelete pagesDelete); + + T visitPagesInsertBlank(ChangeItemPagesInsertBlank pagesInsertBlank); + + T visitPagesInsert(ChangeItemPagesInsert pagesInsert); + + T visitPagesRestore(ChangeItemPagesRestore pagesRestore); + + T visitAttachmentsCreate(ChangeItemAttachmentsCreate attachmentsCreate); + + T visitAttachmentsDelete(ChangeItemAttachmentsDelete attachmentsDelete); + + T visitAttachmentsRestore(ChangeItemAttachmentsRestore attachmentsRestore); + T _visitUnknown(Object unknownType); } @@ -495,7 +733,21 @@ public interface Visitor { @JsonSubTypes.Type(FormsReorderCalculationsValue.class), @JsonSubTypes.Type(FormsUpdateWidgetValue.class), @JsonSubTypes.Type(MetadataUpdateValue.class), - @JsonSubTypes.Type(MetadataUpdateCustomValue.class) + @JsonSubTypes.Type(MetadataUpdateCustomValue.class), + @JsonSubTypes.Type(OutlineCreateValue.class), + @JsonSubTypes.Type(OutlineUpdateValue.class), + @JsonSubTypes.Type(OutlineMoveValue.class), + @JsonSubTypes.Type(OutlineDeleteValue.class), + @JsonSubTypes.Type(OutlineRestoreValue.class), + @JsonSubTypes.Type(PagesRotateValue.class), + @JsonSubTypes.Type(PagesReorderValue.class), + @JsonSubTypes.Type(PagesDeleteValue.class), + @JsonSubTypes.Type(PagesInsertBlankValue.class), + @JsonSubTypes.Type(PagesInsertValue.class), + @JsonSubTypes.Type(PagesRestoreValue.class), + @JsonSubTypes.Type(AttachmentsCreateValue.class), + @JsonSubTypes.Type(AttachmentsDeleteValue.class), + @JsonSubTypes.Type(AttachmentsRestoreValue.class) }) @JsonIgnoreProperties(ignoreUnknown = true) private interface Value { @@ -1463,6 +1715,566 @@ public String toString() { } } + @JsonTypeName("outline.create") + @JsonIgnoreProperties("type") + private static final class OutlineCreateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemOutlineCreate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineCreateValue() {} + + private OutlineCreateValue(ChangeItemOutlineCreate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineCreate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineCreateValue && equalTo((OutlineCreateValue) other); + } + + private boolean equalTo(OutlineCreateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.update") + @JsonIgnoreProperties("type") + private static final class OutlineUpdateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemOutlineUpdate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineUpdateValue() {} + + private OutlineUpdateValue(ChangeItemOutlineUpdate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineUpdate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineUpdateValue && equalTo((OutlineUpdateValue) other); + } + + private boolean equalTo(OutlineUpdateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.move") + @JsonIgnoreProperties("type") + private static final class OutlineMoveValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemOutlineMove value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineMoveValue() {} + + private OutlineMoveValue(ChangeItemOutlineMove value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineMove(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineMoveValue && equalTo((OutlineMoveValue) other); + } + + private boolean equalTo(OutlineMoveValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.delete") + @JsonIgnoreProperties("type") + private static final class OutlineDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemOutlineDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineDeleteValue() {} + + private OutlineDeleteValue(ChangeItemOutlineDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineDeleteValue && equalTo((OutlineDeleteValue) other); + } + + private boolean equalTo(OutlineDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.restore") + @JsonIgnoreProperties("type") + private static final class OutlineRestoreValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemOutlineRestore value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineRestoreValue() {} + + private OutlineRestoreValue(ChangeItemOutlineRestore value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineRestore(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineRestoreValue && equalTo((OutlineRestoreValue) other); + } + + private boolean equalTo(OutlineRestoreValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.rotate") + @JsonIgnoreProperties("type") + private static final class PagesRotateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesRotate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesRotateValue() {} + + private PagesRotateValue(ChangeItemPagesRotate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesRotate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesRotateValue && equalTo((PagesRotateValue) other); + } + + private boolean equalTo(PagesRotateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.reorder") + @JsonIgnoreProperties("type") + private static final class PagesReorderValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesReorder value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesReorderValue() {} + + private PagesReorderValue(ChangeItemPagesReorder value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesReorder(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesReorderValue && equalTo((PagesReorderValue) other); + } + + private boolean equalTo(PagesReorderValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.delete") + @JsonIgnoreProperties("type") + private static final class PagesDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesDeleteValue() {} + + private PagesDeleteValue(ChangeItemPagesDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesDeleteValue && equalTo((PagesDeleteValue) other); + } + + private boolean equalTo(PagesDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.insertBlank") + @JsonIgnoreProperties("type") + private static final class PagesInsertBlankValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesInsertBlank value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesInsertBlankValue() {} + + private PagesInsertBlankValue(ChangeItemPagesInsertBlank value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesInsertBlank(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesInsertBlankValue && equalTo((PagesInsertBlankValue) other); + } + + private boolean equalTo(PagesInsertBlankValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.insert") + @JsonIgnoreProperties("type") + private static final class PagesInsertValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesInsert value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesInsertValue() {} + + private PagesInsertValue(ChangeItemPagesInsert value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesInsert(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesInsertValue && equalTo((PagesInsertValue) other); + } + + private boolean equalTo(PagesInsertValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.restore") + @JsonIgnoreProperties("type") + private static final class PagesRestoreValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemPagesRestore value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesRestoreValue() {} + + private PagesRestoreValue(ChangeItemPagesRestore value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesRestore(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesRestoreValue && equalTo((PagesRestoreValue) other); + } + + private boolean equalTo(PagesRestoreValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("attachments.create") + @JsonIgnoreProperties("type") + private static final class AttachmentsCreateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemAttachmentsCreate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AttachmentsCreateValue() {} + + private AttachmentsCreateValue(ChangeItemAttachmentsCreate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAttachmentsCreate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentsCreateValue && equalTo((AttachmentsCreateValue) other); + } + + private boolean equalTo(AttachmentsCreateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("attachments.delete") + @JsonIgnoreProperties("type") + private static final class AttachmentsDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemAttachmentsDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AttachmentsDeleteValue() {} + + private AttachmentsDeleteValue(ChangeItemAttachmentsDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAttachmentsDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentsDeleteValue && equalTo((AttachmentsDeleteValue) other); + } + + private boolean equalTo(AttachmentsDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + + @JsonTypeName("attachments.restore") + @JsonIgnoreProperties("type") + private static final class AttachmentsRestoreValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeItemAttachmentsRestore value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AttachmentsRestoreValue() {} + + private AttachmentsRestoreValue(ChangeItemAttachmentsRestore value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAttachmentsRestore(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentsRestoreValue && equalTo((AttachmentsRestoreValue) other); + } + + private boolean equalTo(AttachmentsRestoreValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItem{" + "value: " + value + "}"; + } + } + @JsonIgnoreProperties("type") private static final class _UnknownValue implements Value { private String type; diff --git a/src/main/java/api/types/DocPagesRotate200Response.java b/src/main/java/api/types/ChangeItemAttachmentsCreate.java similarity index 58% rename from src/main/java/api/types/DocPagesRotate200Response.java rename to src/main/java/api/types/ChangeItemAttachmentsCreate.java index ef36a92..69e3178 100644 --- a/src/main/java/api/types/DocPagesRotate200Response.java +++ b/src/main/java/api/types/ChangeItemAttachmentsCreate.java @@ -17,35 +17,35 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200Response.Builder.class) -public final class DocPagesRotate200Response { - private final DocPagesRotate200ResponseLayout layout; +@JsonDeserialize(builder = ChangeItemAttachmentsCreate.Builder.class) +public final class ChangeItemAttachmentsCreate { + private final Attachment attachment; - private final MutationMeta meta; + private final AttachmentMutationMeta meta; private final Map additionalProperties; - private DocPagesRotate200Response( - DocPagesRotate200ResponseLayout layout, MutationMeta meta, Map additionalProperties) { - this.layout = layout; + private ChangeItemAttachmentsCreate( + Attachment attachment, AttachmentMutationMeta meta, Map additionalProperties) { + this.attachment = attachment; this.meta = meta; this.additionalProperties = additionalProperties; } - @JsonProperty("layout") - public DocPagesRotate200ResponseLayout getLayout() { - return layout; + @JsonProperty("attachment") + public Attachment getAttachment() { + return attachment; } @JsonProperty("meta") - public MutationMeta getMeta() { + public AttachmentMutationMeta getMeta() { return meta; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200Response && equalTo((DocPagesRotate200Response) other); + return other instanceof ChangeItemAttachmentsCreate && equalTo((ChangeItemAttachmentsCreate) other); } @JsonAnyGetter @@ -53,13 +53,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200Response other) { - return layout.equals(other.layout) && meta.equals(other.meta); + private boolean equalTo(ChangeItemAttachmentsCreate other) { + return attachment.equals(other.attachment) && meta.equals(other.meta); } @java.lang.Override public int hashCode() { - return Objects.hash(this.layout, this.meta); + return Objects.hash(this.attachment, this.meta); } @java.lang.Override @@ -67,22 +67,22 @@ public String toString() { return ObjectMappers.stringify(this); } - public static LayoutStage builder() { + public static AttachmentStage builder() { return new Builder(); } - public interface LayoutStage { - MetaStage layout(@NotNull DocPagesRotate200ResponseLayout layout); + public interface AttachmentStage { + MetaStage attachment(@NotNull Attachment attachment); - Builder from(DocPagesRotate200Response other); + Builder from(ChangeItemAttachmentsCreate other); } public interface MetaStage { - _FinalStage meta(@NotNull MutationMeta meta); + _FinalStage meta(@NotNull AttachmentMutationMeta meta); } public interface _FinalStage { - DocPagesRotate200Response build(); + ChangeItemAttachmentsCreate build(); _FinalStage additionalProperty(String key, Object value); @@ -90,10 +90,10 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements LayoutStage, MetaStage, _FinalStage { - private DocPagesRotate200ResponseLayout layout; + public static final class Builder implements AttachmentStage, MetaStage, _FinalStage { + private Attachment attachment; - private MutationMeta meta; + private AttachmentMutationMeta meta; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -101,29 +101,29 @@ public static final class Builder implements LayoutStage, MetaStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200Response other) { - layout(other.getLayout()); + public Builder from(ChangeItemAttachmentsCreate other) { + attachment(other.getAttachment()); meta(other.getMeta()); return this; } @java.lang.Override - @JsonSetter("layout") - public MetaStage layout(@NotNull DocPagesRotate200ResponseLayout layout) { - this.layout = Objects.requireNonNull(layout, "layout must not be null"); + @JsonSetter("attachment") + public MetaStage attachment(@NotNull Attachment attachment) { + this.attachment = Objects.requireNonNull(attachment, "attachment must not be null"); return this; } @java.lang.Override @JsonSetter("meta") - public _FinalStage meta(@NotNull MutationMeta meta) { + public _FinalStage meta(@NotNull AttachmentMutationMeta meta) { this.meta = Objects.requireNonNull(meta, "meta must not be null"); return this; } @java.lang.Override - public DocPagesRotate200Response build() { - return new DocPagesRotate200Response(layout, meta, additionalProperties); + public ChangeItemAttachmentsCreate build() { + return new ChangeItemAttachmentsCreate(attachment, meta, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemAttachmentsDelete.java b/src/main/java/api/types/ChangeItemAttachmentsDelete.java new file mode 100644 index 0000000..2d95040 --- /dev/null +++ b/src/main/java/api/types/ChangeItemAttachmentsDelete.java @@ -0,0 +1,118 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemAttachmentsDelete.Builder.class) +public final class ChangeItemAttachmentsDelete { + private final AttachmentMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemAttachmentsDelete(AttachmentMutationMeta meta, Map additionalProperties) { + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("meta") + public AttachmentMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemAttachmentsDelete && equalTo((ChangeItemAttachmentsDelete) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemAttachmentsDelete other) { + return meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MetaStage builder() { + return new Builder(); + } + + public interface MetaStage { + _FinalStage meta(@NotNull AttachmentMutationMeta meta); + + Builder from(ChangeItemAttachmentsDelete other); + } + + public interface _FinalStage { + ChangeItemAttachmentsDelete build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MetaStage, _FinalStage { + private AttachmentMutationMeta meta; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemAttachmentsDelete other) { + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull AttachmentMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemAttachmentsDelete build() { + return new ChangeItemAttachmentsDelete(meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesDelete200Response.java b/src/main/java/api/types/ChangeItemAttachmentsRestore.java similarity index 57% rename from src/main/java/api/types/DocPagesDelete200Response.java rename to src/main/java/api/types/ChangeItemAttachmentsRestore.java index e612cfb..4dca8b7 100644 --- a/src/main/java/api/types/DocPagesDelete200Response.java +++ b/src/main/java/api/types/ChangeItemAttachmentsRestore.java @@ -17,35 +17,35 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200Response.Builder.class) -public final class DocPagesDelete200Response { - private final DocPagesDelete200ResponseLayout layout; +@JsonDeserialize(builder = ChangeItemAttachmentsRestore.Builder.class) +public final class ChangeItemAttachmentsRestore { + private final Attachment attachment; - private final MutationMeta meta; + private final AttachmentMutationMeta meta; private final Map additionalProperties; - private DocPagesDelete200Response( - DocPagesDelete200ResponseLayout layout, MutationMeta meta, Map additionalProperties) { - this.layout = layout; + private ChangeItemAttachmentsRestore( + Attachment attachment, AttachmentMutationMeta meta, Map additionalProperties) { + this.attachment = attachment; this.meta = meta; this.additionalProperties = additionalProperties; } - @JsonProperty("layout") - public DocPagesDelete200ResponseLayout getLayout() { - return layout; + @JsonProperty("attachment") + public Attachment getAttachment() { + return attachment; } @JsonProperty("meta") - public MutationMeta getMeta() { + public AttachmentMutationMeta getMeta() { return meta; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200Response && equalTo((DocPagesDelete200Response) other); + return other instanceof ChangeItemAttachmentsRestore && equalTo((ChangeItemAttachmentsRestore) other); } @JsonAnyGetter @@ -53,13 +53,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200Response other) { - return layout.equals(other.layout) && meta.equals(other.meta); + private boolean equalTo(ChangeItemAttachmentsRestore other) { + return attachment.equals(other.attachment) && meta.equals(other.meta); } @java.lang.Override public int hashCode() { - return Objects.hash(this.layout, this.meta); + return Objects.hash(this.attachment, this.meta); } @java.lang.Override @@ -67,22 +67,22 @@ public String toString() { return ObjectMappers.stringify(this); } - public static LayoutStage builder() { + public static AttachmentStage builder() { return new Builder(); } - public interface LayoutStage { - MetaStage layout(@NotNull DocPagesDelete200ResponseLayout layout); + public interface AttachmentStage { + MetaStage attachment(@NotNull Attachment attachment); - Builder from(DocPagesDelete200Response other); + Builder from(ChangeItemAttachmentsRestore other); } public interface MetaStage { - _FinalStage meta(@NotNull MutationMeta meta); + _FinalStage meta(@NotNull AttachmentMutationMeta meta); } public interface _FinalStage { - DocPagesDelete200Response build(); + ChangeItemAttachmentsRestore build(); _FinalStage additionalProperty(String key, Object value); @@ -90,10 +90,10 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements LayoutStage, MetaStage, _FinalStage { - private DocPagesDelete200ResponseLayout layout; + public static final class Builder implements AttachmentStage, MetaStage, _FinalStage { + private Attachment attachment; - private MutationMeta meta; + private AttachmentMutationMeta meta; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -101,29 +101,29 @@ public static final class Builder implements LayoutStage, MetaStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200Response other) { - layout(other.getLayout()); + public Builder from(ChangeItemAttachmentsRestore other) { + attachment(other.getAttachment()); meta(other.getMeta()); return this; } @java.lang.Override - @JsonSetter("layout") - public MetaStage layout(@NotNull DocPagesDelete200ResponseLayout layout) { - this.layout = Objects.requireNonNull(layout, "layout must not be null"); + @JsonSetter("attachment") + public MetaStage attachment(@NotNull Attachment attachment) { + this.attachment = Objects.requireNonNull(attachment, "attachment must not be null"); return this; } @java.lang.Override @JsonSetter("meta") - public _FinalStage meta(@NotNull MutationMeta meta) { + public _FinalStage meta(@NotNull AttachmentMutationMeta meta) { this.meta = Objects.requireNonNull(meta, "meta must not be null"); return this; } @java.lang.Override - public DocPagesDelete200Response build() { - return new DocPagesDelete200Response(layout, meta, additionalProperties); + public ChangeItemAttachmentsRestore build() { + return new ChangeItemAttachmentsRestore(attachment, meta, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemOutlineCreate.java b/src/main/java/api/types/ChangeItemOutlineCreate.java new file mode 100644 index 0000000..a48fd75 --- /dev/null +++ b/src/main/java/api/types/ChangeItemOutlineCreate.java @@ -0,0 +1,163 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemOutlineCreate.Builder.class) +public final class ChangeItemOutlineCreate { + private final OutlineItem item; + + private final OutlineOrder order; + + private final OutlineMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemOutlineCreate( + OutlineItem item, OutlineOrder order, OutlineMutationMeta meta, Map additionalProperties) { + this.item = item; + this.order = order; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("item") + public OutlineItem getItem() { + return item; + } + + @JsonProperty("order") + public OutlineOrder getOrder() { + return order; + } + + @JsonProperty("meta") + public OutlineMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemOutlineCreate && equalTo((ChangeItemOutlineCreate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemOutlineCreate other) { + return item.equals(other.item) && order.equals(other.order) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.item, this.order, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ItemStage builder() { + return new Builder(); + } + + public interface ItemStage { + OrderStage item(@NotNull OutlineItem item); + + Builder from(ChangeItemOutlineCreate other); + } + + public interface OrderStage { + MetaStage order(@NotNull OutlineOrder order); + } + + public interface MetaStage { + _FinalStage meta(@NotNull OutlineMutationMeta meta); + } + + public interface _FinalStage { + ChangeItemOutlineCreate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ItemStage, OrderStage, MetaStage, _FinalStage { + private OutlineItem item; + + private OutlineOrder order; + + private OutlineMutationMeta meta; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemOutlineCreate other) { + item(other.getItem()); + order(other.getOrder()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("item") + public OrderStage item(@NotNull OutlineItem item) { + this.item = Objects.requireNonNull(item, "item must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("order") + public MetaStage order(@NotNull OutlineOrder order) { + this.order = Objects.requireNonNull(order, "order must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull OutlineMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemOutlineCreate build() { + return new ChangeItemOutlineCreate(item, order, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemOutlineDelete.java b/src/main/java/api/types/ChangeItemOutlineDelete.java new file mode 100644 index 0000000..10c4441 --- /dev/null +++ b/src/main/java/api/types/ChangeItemOutlineDelete.java @@ -0,0 +1,118 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemOutlineDelete.Builder.class) +public final class ChangeItemOutlineDelete { + private final OutlineMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemOutlineDelete(OutlineMutationMeta meta, Map additionalProperties) { + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("meta") + public OutlineMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemOutlineDelete && equalTo((ChangeItemOutlineDelete) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemOutlineDelete other) { + return meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MetaStage builder() { + return new Builder(); + } + + public interface MetaStage { + _FinalStage meta(@NotNull OutlineMutationMeta meta); + + Builder from(ChangeItemOutlineDelete other); + } + + public interface _FinalStage { + ChangeItemOutlineDelete build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MetaStage, _FinalStage { + private OutlineMutationMeta meta; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemOutlineDelete other) { + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull OutlineMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemOutlineDelete build() { + return new ChangeItemOutlineDelete(meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemOutlineMove.java b/src/main/java/api/types/ChangeItemOutlineMove.java new file mode 100644 index 0000000..30fbd5f --- /dev/null +++ b/src/main/java/api/types/ChangeItemOutlineMove.java @@ -0,0 +1,163 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemOutlineMove.Builder.class) +public final class ChangeItemOutlineMove { + private final List orders; + + private final OutlineMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemOutlineMove( + List orders, OutlineMutationMeta meta, Map additionalProperties) { + this.orders = orders; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("orders") + public List getOrders() { + return orders; + } + + @JsonProperty("meta") + public OutlineMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemOutlineMove && equalTo((ChangeItemOutlineMove) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemOutlineMove other) { + return orders.equals(other.orders) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.orders, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MetaStage builder() { + return new Builder(); + } + + public interface MetaStage { + _FinalStage meta(@NotNull OutlineMutationMeta meta); + + Builder from(ChangeItemOutlineMove other); + } + + public interface _FinalStage { + ChangeItemOutlineMove build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage orders(List orders); + + _FinalStage addOrders(OutlineOrder orders); + + _FinalStage addAllOrders(List orders); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MetaStage, _FinalStage { + private OutlineMutationMeta meta; + + private List orders = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemOutlineMove other) { + orders(other.getOrders()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull OutlineMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllOrders(List orders) { + if (orders != null) { + this.orders.addAll(orders); + } + return this; + } + + @java.lang.Override + public _FinalStage addOrders(OutlineOrder orders) { + this.orders.add(orders); + return this; + } + + @java.lang.Override + @JsonSetter(value = "orders", nulls = Nulls.SKIP) + public _FinalStage orders(List orders) { + this.orders.clear(); + if (orders != null) { + this.orders.addAll(orders); + } + return this; + } + + @java.lang.Override + public ChangeItemOutlineMove build() { + return new ChangeItemOutlineMove(orders, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemOutlineRestore.java b/src/main/java/api/types/ChangeItemOutlineRestore.java new file mode 100644 index 0000000..a2169f5 --- /dev/null +++ b/src/main/java/api/types/ChangeItemOutlineRestore.java @@ -0,0 +1,188 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemOutlineRestore.Builder.class) +public final class ChangeItemOutlineRestore { + private final List items; + + private final OutlineOrder order; + + private final OutlineMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemOutlineRestore( + List items, + OutlineOrder order, + OutlineMutationMeta meta, + Map additionalProperties) { + this.items = items; + this.order = order; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("items") + public List getItems() { + return items; + } + + @JsonProperty("order") + public OutlineOrder getOrder() { + return order; + } + + @JsonProperty("meta") + public OutlineMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemOutlineRestore && equalTo((ChangeItemOutlineRestore) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemOutlineRestore other) { + return items.equals(other.items) && order.equals(other.order) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.items, this.order, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrderStage builder() { + return new Builder(); + } + + public interface OrderStage { + MetaStage order(@NotNull OutlineOrder order); + + Builder from(ChangeItemOutlineRestore other); + } + + public interface MetaStage { + _FinalStage meta(@NotNull OutlineMutationMeta meta); + } + + public interface _FinalStage { + ChangeItemOutlineRestore build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage items(List items); + + _FinalStage addItems(OutlineItem items); + + _FinalStage addAllItems(List items); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrderStage, MetaStage, _FinalStage { + private OutlineOrder order; + + private OutlineMutationMeta meta; + + private List items = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemOutlineRestore other) { + items(other.getItems()); + order(other.getOrder()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("order") + public MetaStage order(@NotNull OutlineOrder order) { + this.order = Objects.requireNonNull(order, "order must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull OutlineMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllItems(List items) { + if (items != null) { + this.items.addAll(items); + } + return this; + } + + @java.lang.Override + public _FinalStage addItems(OutlineItem items) { + this.items.add(items); + return this; + } + + @java.lang.Override + @JsonSetter(value = "items", nulls = Nulls.SKIP) + public _FinalStage items(List items) { + this.items.clear(); + if (items != null) { + this.items.addAll(items); + } + return this; + } + + @java.lang.Override + public ChangeItemOutlineRestore build() { + return new ChangeItemOutlineRestore(items, order, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemOutlineUpdate.java b/src/main/java/api/types/ChangeItemOutlineUpdate.java new file mode 100644 index 0000000..faa6904 --- /dev/null +++ b/src/main/java/api/types/ChangeItemOutlineUpdate.java @@ -0,0 +1,175 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemOutlineUpdate.Builder.class) +public final class ChangeItemOutlineUpdate { + private final Optional> skipped; + + private final OutlineItem item; + + private final OutlineMutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemOutlineUpdate( + Optional> skipped, + OutlineItem item, + OutlineMutationMeta meta, + Map additionalProperties) { + this.skipped = skipped; + this.item = item; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("skipped") + public Optional> getSkipped() { + return skipped; + } + + @JsonProperty("item") + public OutlineItem getItem() { + return item; + } + + @JsonProperty("meta") + public OutlineMutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemOutlineUpdate && equalTo((ChangeItemOutlineUpdate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemOutlineUpdate other) { + return skipped.equals(other.skipped) && item.equals(other.item) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.skipped, this.item, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ItemStage builder() { + return new Builder(); + } + + public interface ItemStage { + MetaStage item(@NotNull OutlineItem item); + + Builder from(ChangeItemOutlineUpdate other); + } + + public interface MetaStage { + _FinalStage meta(@NotNull OutlineMutationMeta meta); + } + + public interface _FinalStage { + ChangeItemOutlineUpdate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage skipped(Optional> skipped); + + _FinalStage skipped(List skipped); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ItemStage, MetaStage, _FinalStage { + private OutlineItem item; + + private OutlineMutationMeta meta; + + private Optional> skipped = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemOutlineUpdate other) { + skipped(other.getSkipped()); + item(other.getItem()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("item") + public MetaStage item(@NotNull OutlineItem item) { + this.item = Objects.requireNonNull(item, "item must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull OutlineMutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage skipped(List skipped) { + this.skipped = Optional.ofNullable(skipped); + return this; + } + + @java.lang.Override + @JsonSetter(value = "skipped", nulls = Nulls.SKIP) + public _FinalStage skipped(Optional> skipped) { + this.skipped = skipped; + return this; + } + + @java.lang.Override + public ChangeItemOutlineUpdate build() { + return new ChangeItemOutlineUpdate(skipped, item, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesReorder200Response.java b/src/main/java/api/types/ChangeItemPagesDelete.java similarity index 81% rename from src/main/java/api/types/DocPagesReorder200Response.java rename to src/main/java/api/types/ChangeItemPagesDelete.java index 632e850..6656d85 100644 --- a/src/main/java/api/types/DocPagesReorder200Response.java +++ b/src/main/java/api/types/ChangeItemPagesDelete.java @@ -20,19 +20,19 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200Response.Builder.class) -public final class DocPagesReorder200Response { +@JsonDeserialize(builder = ChangeItemPagesDelete.Builder.class) +public final class ChangeItemPagesDelete { private final List pages; - private final DocPagesReorder200ResponseLayout layout; + private final ChangeItemPagesDeleteLayout layout; private final MutationMeta meta; private final Map additionalProperties; - private DocPagesReorder200Response( + private ChangeItemPagesDelete( List pages, - DocPagesReorder200ResponseLayout layout, + ChangeItemPagesDeleteLayout layout, MutationMeta meta, Map additionalProperties) { this.pages = pages; @@ -47,7 +47,7 @@ public List getPages() { } @JsonProperty("layout") - public DocPagesReorder200ResponseLayout getLayout() { + public ChangeItemPagesDeleteLayout getLayout() { return layout; } @@ -59,7 +59,7 @@ public MutationMeta getMeta() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200Response && equalTo((DocPagesReorder200Response) other); + return other instanceof ChangeItemPagesDelete && equalTo((ChangeItemPagesDelete) other); } @JsonAnyGetter @@ -67,7 +67,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200Response other) { + private boolean equalTo(ChangeItemPagesDelete other) { return pages.equals(other.pages) && layout.equals(other.layout) && meta.equals(other.meta); } @@ -86,9 +86,9 @@ public static LayoutStage builder() { } public interface LayoutStage { - MetaStage layout(@NotNull DocPagesReorder200ResponseLayout layout); + MetaStage layout(@NotNull ChangeItemPagesDeleteLayout layout); - Builder from(DocPagesReorder200Response other); + Builder from(ChangeItemPagesDelete other); } public interface MetaStage { @@ -96,7 +96,7 @@ public interface MetaStage { } public interface _FinalStage { - DocPagesReorder200Response build(); + ChangeItemPagesDelete build(); _FinalStage additionalProperty(String key, Object value); @@ -111,7 +111,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements LayoutStage, MetaStage, _FinalStage { - private DocPagesReorder200ResponseLayout layout; + private ChangeItemPagesDeleteLayout layout; private MutationMeta meta; @@ -123,7 +123,7 @@ public static final class Builder implements LayoutStage, MetaStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200Response other) { + public Builder from(ChangeItemPagesDelete other) { pages(other.getPages()); layout(other.getLayout()); meta(other.getMeta()); @@ -132,7 +132,7 @@ public Builder from(DocPagesReorder200Response other) { @java.lang.Override @JsonSetter("layout") - public MetaStage layout(@NotNull DocPagesReorder200ResponseLayout layout) { + public MetaStage layout(@NotNull ChangeItemPagesDeleteLayout layout) { this.layout = Objects.requireNonNull(layout, "layout must not be null"); return this; } @@ -169,8 +169,8 @@ public _FinalStage pages(List pages) { } @java.lang.Override - public DocPagesReorder200Response build() { - return new DocPagesReorder200Response(pages, layout, meta, additionalProperties); + public ChangeItemPagesDelete build() { + return new ChangeItemPagesDelete(pages, layout, meta, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayout.java b/src/main/java/api/types/ChangeItemPagesDeleteLayout.java similarity index 64% rename from src/main/java/api/types/DocPagesRotate200ResponseLayout.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayout.java index c168d51..5be50c3 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayout.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayout.java @@ -19,20 +19,20 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayout.Builder.class) -public final class DocPagesRotate200ResponseLayout { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayout.Builder.class) +public final class ChangeItemPagesDeleteLayout { private final int pageCount; - private final List pages; + private final List pages; - private final List namedPages; + private final List namedPages; private final Map additionalProperties; - private DocPagesRotate200ResponseLayout( + private ChangeItemPagesDeleteLayout( int pageCount, - List pages, - List namedPages, + List pages, + List namedPages, Map additionalProperties) { this.pageCount = pageCount; this.pages = pages; @@ -46,19 +46,19 @@ public int getPageCount() { } @JsonProperty("pages") - public List getPages() { + public List getPages() { return pages; } @JsonProperty("namedPages") - public List getNamedPages() { + public List getNamedPages() { return namedPages; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayout && equalTo((DocPagesRotate200ResponseLayout) other); + return other instanceof ChangeItemPagesDeleteLayout && equalTo((ChangeItemPagesDeleteLayout) other); } @JsonAnyGetter @@ -66,7 +66,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayout other) { + private boolean equalTo(ChangeItemPagesDeleteLayout other) { return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); } @@ -87,36 +87,36 @@ public static PageCountStage builder() { public interface PageCountStage { _FinalStage pageCount(int pageCount); - Builder from(DocPagesRotate200ResponseLayout other); + Builder from(ChangeItemPagesDeleteLayout other); } public interface _FinalStage { - DocPagesRotate200ResponseLayout build(); + ChangeItemPagesDeleteLayout build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - _FinalStage pages(List pages); + _FinalStage pages(List pages); - _FinalStage addPages(DocPagesRotate200ResponseLayoutPagesItem pages); + _FinalStage addPages(ChangeItemPagesDeleteLayoutPagesItem pages); - _FinalStage addAllPages(List pages); + _FinalStage addAllPages(List pages); - _FinalStage namedPages(List namedPages); + _FinalStage namedPages(List namedPages); - _FinalStage addNamedPages(DocPagesRotate200ResponseLayoutNamedPagesItem namedPages); + _FinalStage addNamedPages(ChangeItemPagesDeleteLayoutNamedPagesItem namedPages); - _FinalStage addAllNamedPages(List namedPages); + _FinalStage addAllNamedPages(List namedPages); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements PageCountStage, _FinalStage { private int pageCount; - private List namedPages = new ArrayList<>(); + private List namedPages = new ArrayList<>(); - private List pages = new ArrayList<>(); + private List pages = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -124,7 +124,7 @@ public static final class Builder implements PageCountStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayout other) { + public Builder from(ChangeItemPagesDeleteLayout other) { pageCount(other.getPageCount()); pages(other.getPages()); namedPages(other.getNamedPages()); @@ -139,7 +139,7 @@ public _FinalStage pageCount(int pageCount) { } @java.lang.Override - public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage addAllNamedPages(List namedPages) { if (namedPages != null) { this.namedPages.addAll(namedPages); } @@ -147,14 +147,14 @@ public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage namedPages(List namedPages) { this.namedPages.clear(); if (namedPages != null) { this.namedPages.addAll(namedPages); @@ -163,7 +163,7 @@ public _FinalStage namedPages(List pages) { + public _FinalStage addAllPages(List pages) { if (pages != null) { this.pages.addAll(pages); } @@ -171,14 +171,14 @@ public _FinalStage addAllPages(List pa } @java.lang.Override - public _FinalStage addPages(DocPagesRotate200ResponseLayoutPagesItem pages) { + public _FinalStage addPages(ChangeItemPagesDeleteLayoutPagesItem pages) { this.pages.add(pages); return this; } @java.lang.Override @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { + public _FinalStage pages(List pages) { this.pages.clear(); if (pages != null) { this.pages.addAll(pages); @@ -187,8 +187,8 @@ public _FinalStage pages(List pages) { } @java.lang.Override - public DocPagesRotate200ResponseLayout build() { - return new DocPagesRotate200ResponseLayout(pageCount, pages, namedPages, additionalProperties); + public ChangeItemPagesDeleteLayout build() { + return new ChangeItemPagesDeleteLayout(pageCount, pages, namedPages, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItem.java similarity index 71% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItem.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItem.java index 8717a8b..55323f9 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItem.java @@ -17,17 +17,17 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutNamedPagesItem.Builder.class) -public final class DocPagesInsert200ResponseLayoutNamedPagesItem { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesDeleteLayoutNamedPagesItem { private final String name; - private final DocPagesInsert200ResponseLayoutNamedPagesItemTarget target; + private final ChangeItemPagesDeleteLayoutNamedPagesItemTarget target; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutNamedPagesItem( + private ChangeItemPagesDeleteLayoutNamedPagesItem( String name, - DocPagesInsert200ResponseLayoutNamedPagesItemTarget target, + ChangeItemPagesDeleteLayoutNamedPagesItemTarget target, Map additionalProperties) { this.name = name; this.target = target; @@ -40,15 +40,15 @@ public String getName() { } @JsonProperty("target") - public DocPagesInsert200ResponseLayoutNamedPagesItemTarget getTarget() { + public ChangeItemPagesDeleteLayoutNamedPagesItemTarget getTarget() { return target; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutNamedPagesItem - && equalTo((DocPagesInsert200ResponseLayoutNamedPagesItem) other); + return other instanceof ChangeItemPagesDeleteLayoutNamedPagesItem + && equalTo((ChangeItemPagesDeleteLayoutNamedPagesItem) other); } @JsonAnyGetter @@ -56,7 +56,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutNamedPagesItem other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutNamedPagesItem other) { return name.equals(other.name) && target.equals(other.target); } @@ -77,15 +77,15 @@ public static NameStage builder() { public interface NameStage { TargetStage name(@NotNull String name); - Builder from(DocPagesInsert200ResponseLayoutNamedPagesItem other); + Builder from(ChangeItemPagesDeleteLayoutNamedPagesItem other); } public interface TargetStage { - _FinalStage target(@NotNull DocPagesInsert200ResponseLayoutNamedPagesItemTarget target); + _FinalStage target(@NotNull ChangeItemPagesDeleteLayoutNamedPagesItemTarget target); } public interface _FinalStage { - DocPagesInsert200ResponseLayoutNamedPagesItem build(); + ChangeItemPagesDeleteLayoutNamedPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -96,7 +96,7 @@ public interface _FinalStage { public static final class Builder implements NameStage, TargetStage, _FinalStage { private String name; - private DocPagesInsert200ResponseLayoutNamedPagesItemTarget target; + private ChangeItemPagesDeleteLayoutNamedPagesItemTarget target; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -104,7 +104,7 @@ public static final class Builder implements NameStage, TargetStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutNamedPagesItem other) { + public Builder from(ChangeItemPagesDeleteLayoutNamedPagesItem other) { name(other.getName()); target(other.getTarget()); return this; @@ -119,14 +119,14 @@ public TargetStage name(@NotNull String name) { @java.lang.Override @JsonSetter("target") - public _FinalStage target(@NotNull DocPagesInsert200ResponseLayoutNamedPagesItemTarget target) { + public _FinalStage target(@NotNull ChangeItemPagesDeleteLayoutNamedPagesItemTarget target) { this.target = Objects.requireNonNull(target, "target must not be null"); return this; } @java.lang.Override - public DocPagesInsert200ResponseLayoutNamedPagesItem build() { - return new DocPagesInsert200ResponseLayoutNamedPagesItem(name, target, additionalProperties); + public ChangeItemPagesDeleteLayoutNamedPagesItem build() { + return new ChangeItemPagesDeleteLayoutNamedPagesItem(name, target, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTarget.java similarity index 71% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTarget.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTarget.java index abfb97f..969f82c 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTarget.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTarget.java @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class DocPagesInsert200ResponseLayoutNamedPagesItemTarget { +public final class ChangeItemPagesDeleteLayoutNamedPagesItemTarget { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private DocPagesInsert200ResponseLayoutNamedPagesItemTarget(Value value) { + private ChangeItemPagesDeleteLayoutNamedPagesItemTarget(Value value) { this.value = value; } @@ -26,19 +26,19 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static DocPagesInsert200ResponseLayoutNamedPagesItemTarget page( - DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage value) { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTarget(new PageValue(value)); + public static ChangeItemPagesDeleteLayoutNamedPagesItemTarget page( + ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTarget(new PageValue(value)); } - public static DocPagesInsert200ResponseLayoutNamedPagesItemTarget template( - DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate value) { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTarget(new TemplateValue(value)); + public static ChangeItemPagesDeleteLayoutNamedPagesItemTarget template( + ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTarget(new TemplateValue(value)); } - public static DocPagesInsert200ResponseLayoutNamedPagesItemTarget dangling( - DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling value) { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTarget(new DanglingValue(value)); + public static ChangeItemPagesDeleteLayoutNamedPagesItemTarget dangling( + ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTarget(new DanglingValue(value)); } public boolean isPage() { @@ -57,21 +57,21 @@ public boolean _isUnknown() { return value instanceof _UnknownValue; } - public Optional getPage() { + public Optional getPage() { if (isPage()) { return Optional.of(((PageValue) value).value); } return Optional.empty(); } - public Optional getTemplate() { + public Optional getTemplate() { if (isTemplate()) { return Optional.of(((TemplateValue) value).value); } return Optional.empty(); } - public Optional getDangling() { + public Optional getDangling() { if (isDangling()) { return Optional.of(((DanglingValue) value).value); } @@ -88,8 +88,8 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutNamedPagesItemTarget - && value.equals(((DocPagesInsert200ResponseLayoutNamedPagesItemTarget) other).value); + return other instanceof ChangeItemPagesDeleteLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesDeleteLayoutNamedPagesItemTarget) other).value); } @Override @@ -108,11 +108,11 @@ private Value getValue() { } public interface Visitor { - T visitPage(DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage page); + T visitPage(ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage page); - T visitTemplate(DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate template); + T visitTemplate(ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate template); - T visitDangling(DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling dangling); + T visitDangling(ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling dangling); T _visitUnknown(Object unknownType); } @@ -133,12 +133,12 @@ private interface Value { private static final class PageValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage value; + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private PageValue() {} - private PageValue(DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage value) { + private PageValue(ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage value) { this.value = value; } @@ -164,7 +164,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesInsert200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesDeleteLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -173,12 +173,12 @@ public String toString() { private static final class TemplateValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate value; + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private TemplateValue() {} - private TemplateValue(DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate value) { + private TemplateValue(ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate value) { this.value = value; } @@ -204,7 +204,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesInsert200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesDeleteLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -213,12 +213,12 @@ public String toString() { private static final class DanglingValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling value; + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private DanglingValue() {} - private DanglingValue(DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling value) { + private DanglingValue(ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling value) { this.value = value; } @@ -244,7 +244,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesInsert200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesDeleteLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -280,7 +280,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesInsert200ResponseLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; + return "ChangeItemPagesDeleteLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; } } } diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling.java similarity index 71% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling.java index 6e5d4dd..a7624dd 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling.java @@ -13,18 +13,18 @@ import java.util.Map; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling.Builder.class) -public final class DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling { private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling(Map additionalProperties) { this.additionalProperties = additionalProperties; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling; + return other instanceof ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling; } @JsonAnyGetter @@ -48,12 +48,12 @@ public static final class Builder { private Builder() {} - public Builder from(DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling other) { + public Builder from(ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling other) { return this; } - public DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling build() { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTargetDangling(additionalProperties); + public ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTargetDangling(additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage.java similarity index 75% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage.java index 45f2b08..5d2b220 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage.java @@ -17,13 +17,13 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage.Builder.class) -public final class DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage { private final PageRef page; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage( + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage( PageRef page, Map additionalProperties) { this.page = page; this.additionalProperties = additionalProperties; @@ -37,8 +37,8 @@ public PageRef getPage() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage - && equalTo((DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage) other); + return other instanceof ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage) other); } @JsonAnyGetter @@ -46,7 +46,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage other) { return page.equals(other.page); } @@ -67,11 +67,11 @@ public static PageStage builder() { public interface PageStage { _FinalStage page(@NotNull PageRef page); - Builder from(DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage other); + Builder from(ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage other); } public interface _FinalStage { - DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage build(); + ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage build(); _FinalStage additionalProperty(String key, Object value); @@ -88,7 +88,7 @@ public static final class Builder implements PageStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage other) { + public Builder from(ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage other) { page(other.getPage()); return this; } @@ -101,8 +101,8 @@ public _FinalStage page(@NotNull PageRef page) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage build() { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage(page, additionalProperties); + public ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTargetPage(page, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate.java similarity index 74% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate.java index b7fd7a4..04fcdc7 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate.java @@ -16,13 +16,13 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate.Builder.class) -public final class DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate { private final int objectNumber; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate( + private ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate( int objectNumber, Map additionalProperties) { this.objectNumber = objectNumber; this.additionalProperties = additionalProperties; @@ -36,8 +36,8 @@ public int getObjectNumber() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate - && equalTo((DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate) other); + return other instanceof ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate) other); } @JsonAnyGetter @@ -45,7 +45,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate other) { return objectNumber == other.objectNumber; } @@ -66,11 +66,11 @@ public static ObjectNumberStage builder() { public interface ObjectNumberStage { _FinalStage objectNumber(int objectNumber); - Builder from(DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate other); + Builder from(ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate other); } public interface _FinalStage { - DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate build(); + ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate build(); _FinalStage additionalProperty(String key, Object value); @@ -87,7 +87,7 @@ public static final class Builder implements ObjectNumberStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate other) { + public Builder from(ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate other) { objectNumber(other.getObjectNumber()); return this; } @@ -100,8 +100,8 @@ public _FinalStage objectNumber(int objectNumber) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate build() { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + public ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesDeleteLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItem.java similarity index 76% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItem.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItem.java index 4b0823e..8e59fbe 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItem.java @@ -22,40 +22,40 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItem.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItem { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItem.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItem { private final int index; private final PageRef ref; private final Optional label; - private final DocPagesRotate200ResponseLayoutPagesItemSize size; + private final ChangeItemPagesDeleteLayoutPagesItemSize size; private final double rotation; private final double userUnit; - private final Optional tabOrder; + private final Optional tabOrder; - private final DocPagesRotate200ResponseLayoutPagesItemBoxes boxes; + private final ChangeItemPagesDeleteLayoutPagesItemBoxes boxes; - private final DocPagesRotate200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private final ChangeItemPagesDeleteLayoutPagesItemPdfCropBox pdfCropBox; private final Optional actions; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutPagesItem( + private ChangeItemPagesDeleteLayoutPagesItem( int index, PageRef ref, Optional label, - DocPagesRotate200ResponseLayoutPagesItemSize size, + ChangeItemPagesDeleteLayoutPagesItemSize size, double rotation, double userUnit, - Optional tabOrder, - DocPagesRotate200ResponseLayoutPagesItemBoxes boxes, - DocPagesRotate200ResponseLayoutPagesItemPdfCropBox pdfCropBox, + Optional tabOrder, + ChangeItemPagesDeleteLayoutPagesItemBoxes boxes, + ChangeItemPagesDeleteLayoutPagesItemPdfCropBox pdfCropBox, Optional actions, Map additionalProperties) { this.index = index; @@ -90,7 +90,7 @@ public Optional getLabel() { } @JsonProperty("size") - public DocPagesRotate200ResponseLayoutPagesItemSize getSize() { + public ChangeItemPagesDeleteLayoutPagesItemSize getSize() { return size; } @@ -105,7 +105,7 @@ public double getUserUnit() { } @JsonIgnore - public Optional getTabOrder() { + public Optional getTabOrder() { if (tabOrder == null) { return Optional.empty(); } @@ -113,12 +113,12 @@ public Optional getTabOrder() } @JsonProperty("boxes") - public DocPagesRotate200ResponseLayoutPagesItemBoxes getBoxes() { + public ChangeItemPagesDeleteLayoutPagesItemBoxes getBoxes() { return boxes; } @JsonProperty("pdfCropBox") - public DocPagesRotate200ResponseLayoutPagesItemPdfCropBox getPdfCropBox() { + public ChangeItemPagesDeleteLayoutPagesItemPdfCropBox getPdfCropBox() { return pdfCropBox; } @@ -135,15 +135,15 @@ private Optional _getLabel() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("tabOrder") - private Optional _getTabOrder() { + private Optional _getTabOrder() { return tabOrder; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItem - && equalTo((DocPagesRotate200ResponseLayoutPagesItem) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItem + && equalTo((ChangeItemPagesDeleteLayoutPagesItem) other); } @JsonAnyGetter @@ -151,7 +151,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItem other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItem other) { return index == other.index && ref.equals(other.ref) && label.equals(other.label) @@ -191,7 +191,7 @@ public static IndexStage builder() { public interface IndexStage { RefStage index(int index); - Builder from(DocPagesRotate200ResponseLayoutPagesItem other); + Builder from(ChangeItemPagesDeleteLayoutPagesItem other); } public interface RefStage { @@ -199,7 +199,7 @@ public interface RefStage { } public interface SizeStage { - RotationStage size(@NotNull DocPagesRotate200ResponseLayoutPagesItemSize size); + RotationStage size(@NotNull ChangeItemPagesDeleteLayoutPagesItemSize size); } public interface RotationStage { @@ -211,15 +211,15 @@ public interface UserUnitStage { } public interface BoxesStage { - PdfCropBoxStage boxes(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxes boxes); + PdfCropBoxStage boxes(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxes boxes); } public interface PdfCropBoxStage { - _FinalStage pdfCropBox(@NotNull DocPagesRotate200ResponseLayoutPagesItemPdfCropBox pdfCropBox); + _FinalStage pdfCropBox(@NotNull ChangeItemPagesDeleteLayoutPagesItemPdfCropBox pdfCropBox); } public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItem build(); + ChangeItemPagesDeleteLayoutPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -231,11 +231,11 @@ public interface _FinalStage { _FinalStage label(Nullable label); - _FinalStage tabOrder(Optional tabOrder); + _FinalStage tabOrder(Optional tabOrder); - _FinalStage tabOrder(DocPagesRotate200ResponseLayoutPagesItemTabOrder tabOrder); + _FinalStage tabOrder(ChangeItemPagesDeleteLayoutPagesItemTabOrder tabOrder); - _FinalStage tabOrder(Nullable tabOrder); + _FinalStage tabOrder(Nullable tabOrder); _FinalStage actions(Optional actions); @@ -256,19 +256,19 @@ public static final class Builder private PageRef ref; - private DocPagesRotate200ResponseLayoutPagesItemSize size; + private ChangeItemPagesDeleteLayoutPagesItemSize size; private double rotation; private double userUnit; - private DocPagesRotate200ResponseLayoutPagesItemBoxes boxes; + private ChangeItemPagesDeleteLayoutPagesItemBoxes boxes; - private DocPagesRotate200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private ChangeItemPagesDeleteLayoutPagesItemPdfCropBox pdfCropBox; private Optional actions = Optional.empty(); - private Optional tabOrder = Optional.empty(); + private Optional tabOrder = Optional.empty(); private Optional label = Optional.empty(); @@ -278,7 +278,7 @@ public static final class Builder private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItem other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItem other) { index(other.getIndex()); ref(other.getRef()); label(other.getLabel()); @@ -308,7 +308,7 @@ public SizeStage ref(@NotNull PageRef ref) { @java.lang.Override @JsonSetter("size") - public RotationStage size(@NotNull DocPagesRotate200ResponseLayoutPagesItemSize size) { + public RotationStage size(@NotNull ChangeItemPagesDeleteLayoutPagesItemSize size) { this.size = Objects.requireNonNull(size, "size must not be null"); return this; } @@ -329,14 +329,14 @@ public BoxesStage userUnit(double userUnit) { @java.lang.Override @JsonSetter("boxes") - public PdfCropBoxStage boxes(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxes boxes) { + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxes boxes) { this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); return this; } @java.lang.Override @JsonSetter("pdfCropBox") - public _FinalStage pdfCropBox(@NotNull DocPagesRotate200ResponseLayoutPagesItemPdfCropBox pdfCropBox) { + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesDeleteLayoutPagesItemPdfCropBox pdfCropBox) { this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); return this; } @@ -355,7 +355,7 @@ public _FinalStage actions(Optional actions) { } @java.lang.Override - public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Nullable tabOrder) { if (tabOrder.isNull()) { this.tabOrder = null; } else if (tabOrder.isEmpty()) { @@ -367,14 +367,14 @@ public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Optional tabOrder) { this.tabOrder = tabOrder; return this; } @@ -405,8 +405,8 @@ public _FinalStage label(Optional label) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItem build() { - return new DocPagesRotate200ResponseLayoutPagesItem( + public ChangeItemPagesDeleteLayoutPagesItem build() { + return new ChangeItemPagesDeleteLayoutPagesItem( index, ref, label, diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxes.java similarity index 57% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxes.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxes.java index c3ef30d..5a23b72 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxes.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxes.java @@ -17,26 +17,26 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxes.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxes { - private final DocPagesRotate200ResponseLayoutPagesItemBoxesMedia media; +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxes { + private final ChangeItemPagesDeleteLayoutPagesItemBoxesMedia media; - private final DocPagesRotate200ResponseLayoutPagesItemBoxesCrop crop; + private final ChangeItemPagesDeleteLayoutPagesItemBoxesCrop crop; - private final DocPagesRotate200ResponseLayoutPagesItemBoxesBleed bleed; + private final ChangeItemPagesDeleteLayoutPagesItemBoxesBleed bleed; - private final DocPagesRotate200ResponseLayoutPagesItemBoxesTrim trim; + private final ChangeItemPagesDeleteLayoutPagesItemBoxesTrim trim; - private final DocPagesRotate200ResponseLayoutPagesItemBoxesArt art; + private final ChangeItemPagesDeleteLayoutPagesItemBoxesArt art; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutPagesItemBoxes( - DocPagesRotate200ResponseLayoutPagesItemBoxesMedia media, - DocPagesRotate200ResponseLayoutPagesItemBoxesCrop crop, - DocPagesRotate200ResponseLayoutPagesItemBoxesBleed bleed, - DocPagesRotate200ResponseLayoutPagesItemBoxesTrim trim, - DocPagesRotate200ResponseLayoutPagesItemBoxesArt art, + private ChangeItemPagesDeleteLayoutPagesItemBoxes( + ChangeItemPagesDeleteLayoutPagesItemBoxesMedia media, + ChangeItemPagesDeleteLayoutPagesItemBoxesCrop crop, + ChangeItemPagesDeleteLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesDeleteLayoutPagesItemBoxesTrim trim, + ChangeItemPagesDeleteLayoutPagesItemBoxesArt art, Map additionalProperties) { this.media = media; this.crop = crop; @@ -47,35 +47,35 @@ private DocPagesRotate200ResponseLayoutPagesItemBoxes( } @JsonProperty("media") - public DocPagesRotate200ResponseLayoutPagesItemBoxesMedia getMedia() { + public ChangeItemPagesDeleteLayoutPagesItemBoxesMedia getMedia() { return media; } @JsonProperty("crop") - public DocPagesRotate200ResponseLayoutPagesItemBoxesCrop getCrop() { + public ChangeItemPagesDeleteLayoutPagesItemBoxesCrop getCrop() { return crop; } @JsonProperty("bleed") - public DocPagesRotate200ResponseLayoutPagesItemBoxesBleed getBleed() { + public ChangeItemPagesDeleteLayoutPagesItemBoxesBleed getBleed() { return bleed; } @JsonProperty("trim") - public DocPagesRotate200ResponseLayoutPagesItemBoxesTrim getTrim() { + public ChangeItemPagesDeleteLayoutPagesItemBoxesTrim getTrim() { return trim; } @JsonProperty("art") - public DocPagesRotate200ResponseLayoutPagesItemBoxesArt getArt() { + public ChangeItemPagesDeleteLayoutPagesItemBoxesArt getArt() { return art; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxes - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxes) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxes + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxes) other); } @JsonAnyGetter @@ -83,7 +83,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxes other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxes other) { return media.equals(other.media) && crop.equals(other.crop) && bleed.equals(other.bleed) @@ -106,29 +106,29 @@ public static MediaStage builder() { } public interface MediaStage { - CropStage media(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesMedia media); + CropStage media(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesMedia media); - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxes other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxes other); } public interface CropStage { - BleedStage crop(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesCrop crop); + BleedStage crop(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesCrop crop); } public interface BleedStage { - TrimStage bleed(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesBleed bleed); + TrimStage bleed(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesBleed bleed); } public interface TrimStage { - ArtStage trim(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesTrim trim); + ArtStage trim(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesTrim trim); } public interface ArtStage { - _FinalStage art(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesArt art); + _FinalStage art(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesArt art); } public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxes build(); + ChangeItemPagesDeleteLayoutPagesItemBoxes build(); _FinalStage additionalProperty(String key, Object value); @@ -137,15 +137,15 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { - private DocPagesRotate200ResponseLayoutPagesItemBoxesMedia media; + private ChangeItemPagesDeleteLayoutPagesItemBoxesMedia media; - private DocPagesRotate200ResponseLayoutPagesItemBoxesCrop crop; + private ChangeItemPagesDeleteLayoutPagesItemBoxesCrop crop; - private DocPagesRotate200ResponseLayoutPagesItemBoxesBleed bleed; + private ChangeItemPagesDeleteLayoutPagesItemBoxesBleed bleed; - private DocPagesRotate200ResponseLayoutPagesItemBoxesTrim trim; + private ChangeItemPagesDeleteLayoutPagesItemBoxesTrim trim; - private DocPagesRotate200ResponseLayoutPagesItemBoxesArt art; + private ChangeItemPagesDeleteLayoutPagesItemBoxesArt art; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -153,7 +153,7 @@ public static final class Builder implements MediaStage, CropStage, BleedStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxes other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxes other) { media(other.getMedia()); crop(other.getCrop()); bleed(other.getBleed()); @@ -164,43 +164,42 @@ public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxes other) { @java.lang.Override @JsonSetter("media") - public CropStage media(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesMedia media) { + public CropStage media(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesMedia media) { this.media = Objects.requireNonNull(media, "media must not be null"); return this; } @java.lang.Override @JsonSetter("crop") - public BleedStage crop(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesCrop crop) { + public BleedStage crop(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesCrop crop) { this.crop = Objects.requireNonNull(crop, "crop must not be null"); return this; } @java.lang.Override @JsonSetter("bleed") - public TrimStage bleed(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesBleed bleed) { + public TrimStage bleed(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesBleed bleed) { this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); return this; } @java.lang.Override @JsonSetter("trim") - public ArtStage trim(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesTrim trim) { + public ArtStage trim(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesTrim trim) { this.trim = Objects.requireNonNull(trim, "trim must not be null"); return this; } @java.lang.Override @JsonSetter("art") - public _FinalStage art(@NotNull DocPagesRotate200ResponseLayoutPagesItemBoxesArt art) { + public _FinalStage art(@NotNull ChangeItemPagesDeleteLayoutPagesItemBoxesArt art) { this.art = Objects.requireNonNull(art, "art must not be null"); return this; } @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxes build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxes( - media, crop, bleed, trim, art, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxes build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxes(media, crop, bleed, trim, art, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesArt.java similarity index 82% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesArt.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesArt.java index 8164465..57e0301 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesArt.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesArt.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxesArt.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxesArt { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxesArt { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesDelete200ResponseLayoutPagesItemBoxesArt { private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemBoxesArt( + private ChangeItemPagesDeleteLayoutPagesItemBoxesArt( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxesArt - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxesArt) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxesArt) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxesArt other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxesArt other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesArt other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesArt other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxesArt build(); + ChangeItemPagesDeleteLayoutPagesItemBoxesArt build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesArt other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesArt other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxesArt build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesBleed.java similarity index 82% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesArt.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesBleed.java index 245d677..6fa6ab3 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesArt.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesBleed.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxesArt.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxesArt { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxesBleed { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesRotate200ResponseLayoutPagesItemBoxesArt { private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutPagesItemBoxesArt( + private ChangeItemPagesDeleteLayoutPagesItemBoxesBleed( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxesArt - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxesArt) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxesBleed) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxesArt other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxesBleed other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesArt other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesBleed other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxesArt build(); + ChangeItemPagesDeleteLayoutPagesItemBoxesBleed build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesArt other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesBleed other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxesArt build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesCrop.java similarity index 82% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesArt.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesCrop.java index 3228def..e3e7f00 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesArt.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesCrop.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxesArt.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxesArt { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxesCrop { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesInsert200ResponseLayoutPagesItemBoxesArt { private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutPagesItemBoxesArt( + private ChangeItemPagesDeleteLayoutPagesItemBoxesCrop( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxesArt - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxesArt) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxesCrop) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxesArt other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxesCrop other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesArt other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesCrop other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxesArt build(); + ChangeItemPagesDeleteLayoutPagesItemBoxesCrop build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesArt other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesCrop other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxesArt build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesMedia.java similarity index 82% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesTrim.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesMedia.java index 35e97a8..719ce1f 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesTrim.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesMedia.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxesTrim.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxesTrim { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxesMedia { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesDelete200ResponseLayoutPagesItemBoxesTrim { private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemBoxesTrim( + private ChangeItemPagesDeleteLayoutPagesItemBoxesMedia( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxesTrim - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxesTrim) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxesMedia) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxesTrim other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxesMedia other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesTrim other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesMedia other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxesTrim build(); + ChangeItemPagesDeleteLayoutPagesItemBoxesMedia build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesTrim other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesMedia other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxesTrim build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesTrim.java similarity index 82% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesCrop.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesTrim.java index 5bcf1f1..6543d7f 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesCrop.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemBoxesTrim.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxesCrop.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxesCrop { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemBoxesTrim { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesDelete200ResponseLayoutPagesItemBoxesCrop { private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemBoxesCrop( + private ChangeItemPagesDeleteLayoutPagesItemBoxesTrim( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxesCrop - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxesCrop) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesDeleteLayoutPagesItemBoxesTrim) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxesCrop other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemBoxesTrim other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesCrop other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesTrim other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxesCrop build(); + ChangeItemPagesDeleteLayoutPagesItemBoxesTrim build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesCrop other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemBoxesTrim other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxesCrop build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesDeleteLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemPdfCropBox.java similarity index 82% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemPdfCropBox.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemPdfCropBox.java index 3f7911a..ba0c2b2 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemPdfCropBox.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemPdfCropBox.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemPdfCropBox.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemPdfCropBox { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemPdfCropBox { private final double left; private final double bottom; @@ -28,7 +28,7 @@ public final class DocPagesDelete200ResponseLayoutPagesItemPdfCropBox { private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemPdfCropBox( + private ChangeItemPagesDeleteLayoutPagesItemPdfCropBox( double left, double bottom, double right, double top, Map additionalProperties) { this.left = left; this.bottom = bottom; @@ -60,8 +60,8 @@ public double getTop() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemPdfCropBox - && equalTo((DocPagesDelete200ResponseLayoutPagesItemPdfCropBox) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesDeleteLayoutPagesItemPdfCropBox) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemPdfCropBox other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemPdfCropBox other) { return left == other.left && bottom == other.bottom && right == other.right && top == other.top; } @@ -90,7 +90,7 @@ public static LeftStage builder() { public interface LeftStage { BottomStage left(double left); - Builder from(DocPagesDelete200ResponseLayoutPagesItemPdfCropBox other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemPdfCropBox other); } public interface BottomStage { @@ -106,7 +106,7 @@ public interface TopStage { } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemPdfCropBox build(); + ChangeItemPagesDeleteLayoutPagesItemPdfCropBox build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements LeftStage, BottomStage, RightStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemPdfCropBox other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemPdfCropBox other) { left(other.getLeft()); bottom(other.getBottom()); right(other.getRight()); @@ -166,9 +166,8 @@ public _FinalStage top(double top) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemPdfCropBox build() { - return new DocPagesDelete200ResponseLayoutPagesItemPdfCropBox( - left, bottom, right, top, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesDeleteLayoutPagesItemPdfCropBox(left, bottom, right, top, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemSize.java similarity index 80% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemSize.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemSize.java index f4ee526..8b763bc 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemSize.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemSize.java @@ -16,15 +16,15 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemSize.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemSize { +@JsonDeserialize(builder = ChangeItemPagesDeleteLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesDeleteLayoutPagesItemSize { private final double width; private final double height; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutPagesItemSize( + private ChangeItemPagesDeleteLayoutPagesItemSize( double width, double height, Map additionalProperties) { this.width = width; this.height = height; @@ -44,8 +44,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemSize - && equalTo((DocPagesRotate200ResponseLayoutPagesItemSize) other); + return other instanceof ChangeItemPagesDeleteLayoutPagesItemSize + && equalTo((ChangeItemPagesDeleteLayoutPagesItemSize) other); } @JsonAnyGetter @@ -53,7 +53,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemSize other) { + private boolean equalTo(ChangeItemPagesDeleteLayoutPagesItemSize other) { return width == other.width && height == other.height; } @@ -74,7 +74,7 @@ public static WidthStage builder() { public interface WidthStage { HeightStage width(double width); - Builder from(DocPagesRotate200ResponseLayoutPagesItemSize other); + Builder from(ChangeItemPagesDeleteLayoutPagesItemSize other); } public interface HeightStage { @@ -82,7 +82,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemSize build(); + ChangeItemPagesDeleteLayoutPagesItemSize build(); _FinalStage additionalProperty(String key, Object value); @@ -101,7 +101,7 @@ public static final class Builder implements WidthStage, HeightStage, _FinalStag private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemSize other) { + public Builder from(ChangeItemPagesDeleteLayoutPagesItemSize other) { width(other.getWidth()); height(other.getHeight()); return this; @@ -122,8 +122,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemSize build() { - return new DocPagesRotate200ResponseLayoutPagesItemSize(width, height, additionalProperties); + public ChangeItemPagesDeleteLayoutPagesItemSize build() { + return new ChangeItemPagesDeleteLayoutPagesItemSize(width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemTabOrder.java similarity index 59% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemTabOrder.java rename to src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemTabOrder.java index c1ac9c4..1d7b327 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemTabOrder.java +++ b/src/main/java/api/types/ChangeItemPagesDeleteLayoutPagesItemTabOrder.java @@ -6,27 +6,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class DocPagesInsert200ResponseLayoutPagesItemTabOrder { - public static final DocPagesInsert200ResponseLayoutPagesItemTabOrder WIDGETS = - new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); +public final class ChangeItemPagesDeleteLayoutPagesItemTabOrder { + public static final ChangeItemPagesDeleteLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); - public static final DocPagesInsert200ResponseLayoutPagesItemTabOrder COLUMNS = - new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + public static final ChangeItemPagesDeleteLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); - public static final DocPagesInsert200ResponseLayoutPagesItemTabOrder ANNOTATIONS = - new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + public static final ChangeItemPagesDeleteLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); - public static final DocPagesInsert200ResponseLayoutPagesItemTabOrder ROWS = - new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.ROWS, "rows"); + public static final ChangeItemPagesDeleteLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.ROWS, "rows"); - public static final DocPagesInsert200ResponseLayoutPagesItemTabOrder STRUCTURE = - new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + public static final ChangeItemPagesDeleteLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); private final Value value; private final String string; - DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value value, String string) { + ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value value, String string) { this.value = value; this.string = string; } @@ -44,8 +44,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof DocPagesInsert200ResponseLayoutPagesItemTabOrder - && this.string.equals(((DocPagesInsert200ResponseLayoutPagesItemTabOrder) other).string)); + || (other instanceof ChangeItemPagesDeleteLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesDeleteLayoutPagesItemTabOrder) other).string)); } @java.lang.Override @@ -72,7 +72,7 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DocPagesInsert200ResponseLayoutPagesItemTabOrder valueOf(String value) { + public static ChangeItemPagesDeleteLayoutPagesItemTabOrder valueOf(String value) { switch (value) { case "widgets": return WIDGETS; @@ -85,7 +85,7 @@ public static DocPagesInsert200ResponseLayoutPagesItemTabOrder valueOf(String va case "structure": return STRUCTURE; default: - return new DocPagesInsert200ResponseLayoutPagesItemTabOrder(Value.UNKNOWN, value); + return new ChangeItemPagesDeleteLayoutPagesItemTabOrder(Value.UNKNOWN, value); } } diff --git a/src/main/java/api/types/DocPagesInsert200Response.java b/src/main/java/api/types/ChangeItemPagesInsert.java similarity index 82% rename from src/main/java/api/types/DocPagesInsert200Response.java rename to src/main/java/api/types/ChangeItemPagesInsert.java index faa4e3a..099d4cf 100644 --- a/src/main/java/api/types/DocPagesInsert200Response.java +++ b/src/main/java/api/types/ChangeItemPagesInsert.java @@ -20,19 +20,19 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200Response.Builder.class) -public final class DocPagesInsert200Response { +@JsonDeserialize(builder = ChangeItemPagesInsert.Builder.class) +public final class ChangeItemPagesInsert { private final List insertedPages; - private final DocPagesInsert200ResponseLayout layout; + private final ChangeItemPagesInsertLayout layout; private final MutationMeta meta; private final Map additionalProperties; - private DocPagesInsert200Response( + private ChangeItemPagesInsert( List insertedPages, - DocPagesInsert200ResponseLayout layout, + ChangeItemPagesInsertLayout layout, MutationMeta meta, Map additionalProperties) { this.insertedPages = insertedPages; @@ -47,7 +47,7 @@ public List getInsertedPages() { } @JsonProperty("layout") - public DocPagesInsert200ResponseLayout getLayout() { + public ChangeItemPagesInsertLayout getLayout() { return layout; } @@ -59,7 +59,7 @@ public MutationMeta getMeta() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200Response && equalTo((DocPagesInsert200Response) other); + return other instanceof ChangeItemPagesInsert && equalTo((ChangeItemPagesInsert) other); } @JsonAnyGetter @@ -67,7 +67,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200Response other) { + private boolean equalTo(ChangeItemPagesInsert other) { return insertedPages.equals(other.insertedPages) && layout.equals(other.layout) && meta.equals(other.meta); } @@ -86,9 +86,9 @@ public static LayoutStage builder() { } public interface LayoutStage { - MetaStage layout(@NotNull DocPagesInsert200ResponseLayout layout); + MetaStage layout(@NotNull ChangeItemPagesInsertLayout layout); - Builder from(DocPagesInsert200Response other); + Builder from(ChangeItemPagesInsert other); } public interface MetaStage { @@ -96,7 +96,7 @@ public interface MetaStage { } public interface _FinalStage { - DocPagesInsert200Response build(); + ChangeItemPagesInsert build(); _FinalStage additionalProperty(String key, Object value); @@ -111,7 +111,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements LayoutStage, MetaStage, _FinalStage { - private DocPagesInsert200ResponseLayout layout; + private ChangeItemPagesInsertLayout layout; private MutationMeta meta; @@ -123,7 +123,7 @@ public static final class Builder implements LayoutStage, MetaStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200Response other) { + public Builder from(ChangeItemPagesInsert other) { insertedPages(other.getInsertedPages()); layout(other.getLayout()); meta(other.getMeta()); @@ -132,7 +132,7 @@ public Builder from(DocPagesInsert200Response other) { @java.lang.Override @JsonSetter("layout") - public MetaStage layout(@NotNull DocPagesInsert200ResponseLayout layout) { + public MetaStage layout(@NotNull ChangeItemPagesInsertLayout layout) { this.layout = Objects.requireNonNull(layout, "layout must not be null"); return this; } @@ -169,8 +169,8 @@ public _FinalStage insertedPages(List insertedPages) { } @java.lang.Override - public DocPagesInsert200Response build() { - return new DocPagesInsert200Response(insertedPages, layout, meta, additionalProperties); + public ChangeItemPagesInsert build() { + return new ChangeItemPagesInsert(insertedPages, layout, meta, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsertBlank200Response.java b/src/main/java/api/types/ChangeItemPagesInsertBlank.java similarity index 81% rename from src/main/java/api/types/DocPagesInsertBlank200Response.java rename to src/main/java/api/types/ChangeItemPagesInsertBlank.java index 7dca86c..e6a4c0e 100644 --- a/src/main/java/api/types/DocPagesInsertBlank200Response.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlank.java @@ -20,19 +20,19 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200Response.Builder.class) -public final class DocPagesInsertBlank200Response { +@JsonDeserialize(builder = ChangeItemPagesInsertBlank.Builder.class) +public final class ChangeItemPagesInsertBlank { private final List insertedPages; - private final DocPagesInsertBlank200ResponseLayout layout; + private final ChangeItemPagesInsertBlankLayout layout; private final MutationMeta meta; private final Map additionalProperties; - private DocPagesInsertBlank200Response( + private ChangeItemPagesInsertBlank( List insertedPages, - DocPagesInsertBlank200ResponseLayout layout, + ChangeItemPagesInsertBlankLayout layout, MutationMeta meta, Map additionalProperties) { this.insertedPages = insertedPages; @@ -47,7 +47,7 @@ public List getInsertedPages() { } @JsonProperty("layout") - public DocPagesInsertBlank200ResponseLayout getLayout() { + public ChangeItemPagesInsertBlankLayout getLayout() { return layout; } @@ -59,7 +59,7 @@ public MutationMeta getMeta() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsertBlank200Response && equalTo((DocPagesInsertBlank200Response) other); + return other instanceof ChangeItemPagesInsertBlank && equalTo((ChangeItemPagesInsertBlank) other); } @JsonAnyGetter @@ -67,7 +67,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsertBlank200Response other) { + private boolean equalTo(ChangeItemPagesInsertBlank other) { return insertedPages.equals(other.insertedPages) && layout.equals(other.layout) && meta.equals(other.meta); } @@ -86,9 +86,9 @@ public static LayoutStage builder() { } public interface LayoutStage { - MetaStage layout(@NotNull DocPagesInsertBlank200ResponseLayout layout); + MetaStage layout(@NotNull ChangeItemPagesInsertBlankLayout layout); - Builder from(DocPagesInsertBlank200Response other); + Builder from(ChangeItemPagesInsertBlank other); } public interface MetaStage { @@ -96,7 +96,7 @@ public interface MetaStage { } public interface _FinalStage { - DocPagesInsertBlank200Response build(); + ChangeItemPagesInsertBlank build(); _FinalStage additionalProperty(String key, Object value); @@ -111,7 +111,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements LayoutStage, MetaStage, _FinalStage { - private DocPagesInsertBlank200ResponseLayout layout; + private ChangeItemPagesInsertBlankLayout layout; private MutationMeta meta; @@ -123,7 +123,7 @@ public static final class Builder implements LayoutStage, MetaStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesInsertBlank200Response other) { + public Builder from(ChangeItemPagesInsertBlank other) { insertedPages(other.getInsertedPages()); layout(other.getLayout()); meta(other.getMeta()); @@ -132,7 +132,7 @@ public Builder from(DocPagesInsertBlank200Response other) { @java.lang.Override @JsonSetter("layout") - public MetaStage layout(@NotNull DocPagesInsertBlank200ResponseLayout layout) { + public MetaStage layout(@NotNull ChangeItemPagesInsertBlankLayout layout) { this.layout = Objects.requireNonNull(layout, "layout must not be null"); return this; } @@ -169,8 +169,8 @@ public _FinalStage insertedPages(List insertedPages) { } @java.lang.Override - public DocPagesInsertBlank200Response build() { - return new DocPagesInsertBlank200Response(insertedPages, layout, meta, additionalProperties); + public ChangeItemPagesInsertBlank build() { + return new ChangeItemPagesInsertBlank(insertedPages, layout, meta, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayout.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayout.java similarity index 69% rename from src/main/java/api/types/DocPagesReorder200ResponseLayout.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayout.java index 293b32d..5715123 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayout.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayout.java @@ -19,20 +19,20 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayout.Builder.class) -public final class DocPagesReorder200ResponseLayout { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayout.Builder.class) +public final class ChangeItemPagesInsertBlankLayout { private final int pageCount; - private final List pages; + private final List pages; - private final List namedPages; + private final List namedPages; private final Map additionalProperties; - private DocPagesReorder200ResponseLayout( + private ChangeItemPagesInsertBlankLayout( int pageCount, - List pages, - List namedPages, + List pages, + List namedPages, Map additionalProperties) { this.pageCount = pageCount; this.pages = pages; @@ -46,19 +46,19 @@ public int getPageCount() { } @JsonProperty("pages") - public List getPages() { + public List getPages() { return pages; } @JsonProperty("namedPages") - public List getNamedPages() { + public List getNamedPages() { return namedPages; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayout && equalTo((DocPagesReorder200ResponseLayout) other); + return other instanceof ChangeItemPagesInsertBlankLayout && equalTo((ChangeItemPagesInsertBlankLayout) other); } @JsonAnyGetter @@ -66,7 +66,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayout other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayout other) { return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); } @@ -87,36 +87,36 @@ public static PageCountStage builder() { public interface PageCountStage { _FinalStage pageCount(int pageCount); - Builder from(DocPagesReorder200ResponseLayout other); + Builder from(ChangeItemPagesInsertBlankLayout other); } public interface _FinalStage { - DocPagesReorder200ResponseLayout build(); + ChangeItemPagesInsertBlankLayout build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - _FinalStage pages(List pages); + _FinalStage pages(List pages); - _FinalStage addPages(DocPagesReorder200ResponseLayoutPagesItem pages); + _FinalStage addPages(ChangeItemPagesInsertBlankLayoutPagesItem pages); - _FinalStage addAllPages(List pages); + _FinalStage addAllPages(List pages); - _FinalStage namedPages(List namedPages); + _FinalStage namedPages(List namedPages); - _FinalStage addNamedPages(DocPagesReorder200ResponseLayoutNamedPagesItem namedPages); + _FinalStage addNamedPages(ChangeItemPagesInsertBlankLayoutNamedPagesItem namedPages); - _FinalStage addAllNamedPages(List namedPages); + _FinalStage addAllNamedPages(List namedPages); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements PageCountStage, _FinalStage { private int pageCount; - private List namedPages = new ArrayList<>(); + private List namedPages = new ArrayList<>(); - private List pages = new ArrayList<>(); + private List pages = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -124,7 +124,7 @@ public static final class Builder implements PageCountStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayout other) { + public Builder from(ChangeItemPagesInsertBlankLayout other) { pageCount(other.getPageCount()); pages(other.getPages()); namedPages(other.getNamedPages()); @@ -139,7 +139,7 @@ public _FinalStage pageCount(int pageCount) { } @java.lang.Override - public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage addAllNamedPages(List namedPages) { if (namedPages != null) { this.namedPages.addAll(namedPages); } @@ -147,14 +147,14 @@ public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage namedPages(List namedPages) { this.namedPages.clear(); if (namedPages != null) { this.namedPages.addAll(namedPages); @@ -163,7 +163,7 @@ public _FinalStage namedPages(List pages) { + public _FinalStage addAllPages(List pages) { if (pages != null) { this.pages.addAll(pages); } @@ -171,14 +171,14 @@ public _FinalStage addAllPages(List p } @java.lang.Override - public _FinalStage addPages(DocPagesReorder200ResponseLayoutPagesItem pages) { + public _FinalStage addPages(ChangeItemPagesInsertBlankLayoutPagesItem pages) { this.pages.add(pages); return this; } @java.lang.Override @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { + public _FinalStage pages(List pages) { this.pages.clear(); if (pages != null) { this.pages.addAll(pages); @@ -187,8 +187,8 @@ public _FinalStage pages(List pages) } @java.lang.Override - public DocPagesReorder200ResponseLayout build() { - return new DocPagesReorder200ResponseLayout(pageCount, pages, namedPages, additionalProperties); + public ChangeItemPagesInsertBlankLayout build() { + return new ChangeItemPagesInsertBlankLayout(pageCount, pages, namedPages, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItem.java similarity index 76% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItem.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItem.java index 138ede4..f37e343 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItem.java @@ -17,17 +17,17 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutNamedPagesItem.Builder.class) -public final class DocPagesReorder200ResponseLayoutNamedPagesItem { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutNamedPagesItem { private final String name; - private final DocPagesReorder200ResponseLayoutNamedPagesItemTarget target; + private final ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget target; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutNamedPagesItem( + private ChangeItemPagesInsertBlankLayoutNamedPagesItem( String name, - DocPagesReorder200ResponseLayoutNamedPagesItemTarget target, + ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget target, Map additionalProperties) { this.name = name; this.target = target; @@ -40,15 +40,15 @@ public String getName() { } @JsonProperty("target") - public DocPagesReorder200ResponseLayoutNamedPagesItemTarget getTarget() { + public ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget getTarget() { return target; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutNamedPagesItem - && equalTo((DocPagesReorder200ResponseLayoutNamedPagesItem) other); + return other instanceof ChangeItemPagesInsertBlankLayoutNamedPagesItem + && equalTo((ChangeItemPagesInsertBlankLayoutNamedPagesItem) other); } @JsonAnyGetter @@ -56,7 +56,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutNamedPagesItem other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutNamedPagesItem other) { return name.equals(other.name) && target.equals(other.target); } @@ -77,15 +77,15 @@ public static NameStage builder() { public interface NameStage { TargetStage name(@NotNull String name); - Builder from(DocPagesReorder200ResponseLayoutNamedPagesItem other); + Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItem other); } public interface TargetStage { - _FinalStage target(@NotNull DocPagesReorder200ResponseLayoutNamedPagesItemTarget target); + _FinalStage target(@NotNull ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget target); } public interface _FinalStage { - DocPagesReorder200ResponseLayoutNamedPagesItem build(); + ChangeItemPagesInsertBlankLayoutNamedPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -96,7 +96,7 @@ public interface _FinalStage { public static final class Builder implements NameStage, TargetStage, _FinalStage { private String name; - private DocPagesReorder200ResponseLayoutNamedPagesItemTarget target; + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget target; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -104,7 +104,7 @@ public static final class Builder implements NameStage, TargetStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutNamedPagesItem other) { + public Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItem other) { name(other.getName()); target(other.getTarget()); return this; @@ -119,14 +119,14 @@ public TargetStage name(@NotNull String name) { @java.lang.Override @JsonSetter("target") - public _FinalStage target(@NotNull DocPagesReorder200ResponseLayoutNamedPagesItemTarget target) { + public _FinalStage target(@NotNull ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget target) { this.target = Objects.requireNonNull(target, "target must not be null"); return this; } @java.lang.Override - public DocPagesReorder200ResponseLayoutNamedPagesItem build() { - return new DocPagesReorder200ResponseLayoutNamedPagesItem(name, target, additionalProperties); + public ChangeItemPagesInsertBlankLayoutNamedPagesItem build() { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItem(name, target, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.java similarity index 80% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTarget.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.java index e8c7aa0..a704ab4 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTarget.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.java @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class DocPagesReorder200ResponseLayoutNamedPagesItemTarget { +public final class ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private DocPagesReorder200ResponseLayoutNamedPagesItemTarget(Value value) { + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget(Value value) { this.value = value; } @@ -26,19 +26,19 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static DocPagesReorder200ResponseLayoutNamedPagesItemTarget page( - DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage value) { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTarget(new PageValue(value)); + public static ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget page( + ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget(new PageValue(value)); } - public static DocPagesReorder200ResponseLayoutNamedPagesItemTarget template( - DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate value) { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTarget(new TemplateValue(value)); + public static ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget template( + ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget(new TemplateValue(value)); } - public static DocPagesReorder200ResponseLayoutNamedPagesItemTarget dangling( - DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling value) { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTarget(new DanglingValue(value)); + public static ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget dangling( + ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget(new DanglingValue(value)); } public boolean isPage() { @@ -57,21 +57,21 @@ public boolean _isUnknown() { return value instanceof _UnknownValue; } - public Optional getPage() { + public Optional getPage() { if (isPage()) { return Optional.of(((PageValue) value).value); } return Optional.empty(); } - public Optional getTemplate() { + public Optional getTemplate() { if (isTemplate()) { return Optional.of(((TemplateValue) value).value); } return Optional.empty(); } - public Optional getDangling() { + public Optional getDangling() { if (isDangling()) { return Optional.of(((DanglingValue) value).value); } @@ -88,8 +88,8 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutNamedPagesItemTarget - && value.equals(((DocPagesReorder200ResponseLayoutNamedPagesItemTarget) other).value); + return other instanceof ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget) other).value); } @Override @@ -108,11 +108,11 @@ private Value getValue() { } public interface Visitor { - T visitPage(DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage page); + T visitPage(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage page); - T visitTemplate(DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate template); + T visitTemplate(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate template); - T visitDangling(DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling dangling); + T visitDangling(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling dangling); T _visitUnknown(Object unknownType); } @@ -133,12 +133,12 @@ private interface Value { private static final class PageValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage value; + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private PageValue() {} - private PageValue(DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage value) { + private PageValue(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage value) { this.value = value; } @@ -164,7 +164,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesReorder200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -173,12 +173,12 @@ public String toString() { private static final class TemplateValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate value; + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private TemplateValue() {} - private TemplateValue(DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate value) { + private TemplateValue(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate value) { this.value = value; } @@ -204,7 +204,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesReorder200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -213,12 +213,12 @@ public String toString() { private static final class DanglingValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling value; + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private DanglingValue() {} - private DanglingValue(DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling value) { + private DanglingValue(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling value) { this.value = value; } @@ -244,7 +244,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesReorder200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -280,7 +280,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesReorder200ResponseLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + return "ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; } } diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling.java similarity index 81% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling.java index 0815304..7fccc70 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling.java @@ -13,18 +13,18 @@ import java.util.Map; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling.Builder.class) -public final class DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling(Map additionalProperties) { this.additionalProperties = additionalProperties; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling; + return other instanceof ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling; } @JsonAnyGetter @@ -48,12 +48,12 @@ public static final class Builder { private Builder() {} - public Builder from(DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling other) { + public Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling other) { return this; } - public DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling build() { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTargetDangling(additionalProperties); + public ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetDangling(additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage.java similarity index 82% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage.java index 0aed54f..82a126e 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage.java @@ -17,13 +17,13 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage.Builder.class) -public final class DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage { private final PageRef page; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage( + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage( PageRef page, Map additionalProperties) { this.page = page; this.additionalProperties = additionalProperties; @@ -37,8 +37,8 @@ public PageRef getPage() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage - && equalTo((DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage) other); + return other instanceof ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage) other); } @JsonAnyGetter @@ -46,7 +46,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage other) { return page.equals(other.page); } @@ -67,11 +67,11 @@ public static PageStage builder() { public interface PageStage { _FinalStage page(@NotNull PageRef page); - Builder from(DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage other); + Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage other); } public interface _FinalStage { - DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage build(); + ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage build(); _FinalStage additionalProperty(String key, Object value); @@ -88,7 +88,7 @@ public static final class Builder implements PageStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage other) { + public Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage other) { page(other.getPage()); return this; } @@ -101,8 +101,8 @@ public _FinalStage page(@NotNull PageRef page) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage build() { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTargetPage(page, additionalProperties); + public ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetPage(page, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate.java similarity index 82% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate.java index 78190a0..791db1f 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate.java @@ -16,13 +16,13 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate.Builder.class) -public final class DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate { private final int objectNumber; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate( + private ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate( int objectNumber, Map additionalProperties) { this.objectNumber = objectNumber; this.additionalProperties = additionalProperties; @@ -36,8 +36,8 @@ public int getObjectNumber() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate - && equalTo((DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate) other); + return other instanceof ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate) other); } @JsonAnyGetter @@ -45,7 +45,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate other) { return objectNumber == other.objectNumber; } @@ -66,11 +66,11 @@ public static ObjectNumberStage builder() { public interface ObjectNumberStage { _FinalStage objectNumber(int objectNumber); - Builder from(DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate other); + Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate other); } public interface _FinalStage { - DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate build(); + ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate build(); _FinalStage additionalProperty(String key, Object value); @@ -87,7 +87,7 @@ public static final class Builder implements ObjectNumberStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate other) { + public Builder from(ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate other) { objectNumber(other.getObjectNumber()); return this; } @@ -100,8 +100,8 @@ public _FinalStage objectNumber(int objectNumber) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate build() { - return new DocPagesReorder200ResponseLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + public ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesInsertBlankLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItem.java similarity index 79% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItem.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItem.java index bb5c59d..c5cc515 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItem.java @@ -22,40 +22,40 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItem.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItem { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItem.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItem { private final int index; private final PageRef ref; private final Optional label; - private final DocPagesReorder200ResponseLayoutPagesItemSize size; + private final ChangeItemPagesInsertBlankLayoutPagesItemSize size; private final double rotation; private final double userUnit; - private final Optional tabOrder; + private final Optional tabOrder; - private final DocPagesReorder200ResponseLayoutPagesItemBoxes boxes; + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxes boxes; - private final DocPagesReorder200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private final ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox pdfCropBox; private final Optional actions; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItem( + private ChangeItemPagesInsertBlankLayoutPagesItem( int index, PageRef ref, Optional label, - DocPagesReorder200ResponseLayoutPagesItemSize size, + ChangeItemPagesInsertBlankLayoutPagesItemSize size, double rotation, double userUnit, - Optional tabOrder, - DocPagesReorder200ResponseLayoutPagesItemBoxes boxes, - DocPagesReorder200ResponseLayoutPagesItemPdfCropBox pdfCropBox, + Optional tabOrder, + ChangeItemPagesInsertBlankLayoutPagesItemBoxes boxes, + ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox pdfCropBox, Optional actions, Map additionalProperties) { this.index = index; @@ -90,7 +90,7 @@ public Optional getLabel() { } @JsonProperty("size") - public DocPagesReorder200ResponseLayoutPagesItemSize getSize() { + public ChangeItemPagesInsertBlankLayoutPagesItemSize getSize() { return size; } @@ -105,7 +105,7 @@ public double getUserUnit() { } @JsonIgnore - public Optional getTabOrder() { + public Optional getTabOrder() { if (tabOrder == null) { return Optional.empty(); } @@ -113,12 +113,12 @@ public Optional getTabOrder() } @JsonProperty("boxes") - public DocPagesReorder200ResponseLayoutPagesItemBoxes getBoxes() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxes getBoxes() { return boxes; } @JsonProperty("pdfCropBox") - public DocPagesReorder200ResponseLayoutPagesItemPdfCropBox getPdfCropBox() { + public ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox getPdfCropBox() { return pdfCropBox; } @@ -135,15 +135,15 @@ private Optional _getLabel() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("tabOrder") - private Optional _getTabOrder() { + private Optional _getTabOrder() { return tabOrder; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItem - && equalTo((DocPagesReorder200ResponseLayoutPagesItem) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItem + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItem) other); } @JsonAnyGetter @@ -151,7 +151,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItem other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItem other) { return index == other.index && ref.equals(other.ref) && label.equals(other.label) @@ -191,7 +191,7 @@ public static IndexStage builder() { public interface IndexStage { RefStage index(int index); - Builder from(DocPagesReorder200ResponseLayoutPagesItem other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItem other); } public interface RefStage { @@ -199,7 +199,7 @@ public interface RefStage { } public interface SizeStage { - RotationStage size(@NotNull DocPagesReorder200ResponseLayoutPagesItemSize size); + RotationStage size(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemSize size); } public interface RotationStage { @@ -211,15 +211,15 @@ public interface UserUnitStage { } public interface BoxesStage { - PdfCropBoxStage boxes(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxes boxes); + PdfCropBoxStage boxes(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxes boxes); } public interface PdfCropBoxStage { - _FinalStage pdfCropBox(@NotNull DocPagesReorder200ResponseLayoutPagesItemPdfCropBox pdfCropBox); + _FinalStage pdfCropBox(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox pdfCropBox); } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItem build(); + ChangeItemPagesInsertBlankLayoutPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -231,11 +231,11 @@ public interface _FinalStage { _FinalStage label(Nullable label); - _FinalStage tabOrder(Optional tabOrder); + _FinalStage tabOrder(Optional tabOrder); - _FinalStage tabOrder(DocPagesReorder200ResponseLayoutPagesItemTabOrder tabOrder); + _FinalStage tabOrder(ChangeItemPagesInsertBlankLayoutPagesItemTabOrder tabOrder); - _FinalStage tabOrder(Nullable tabOrder); + _FinalStage tabOrder(Nullable tabOrder); _FinalStage actions(Optional actions); @@ -256,19 +256,19 @@ public static final class Builder private PageRef ref; - private DocPagesReorder200ResponseLayoutPagesItemSize size; + private ChangeItemPagesInsertBlankLayoutPagesItemSize size; private double rotation; private double userUnit; - private DocPagesReorder200ResponseLayoutPagesItemBoxes boxes; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxes boxes; - private DocPagesReorder200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox pdfCropBox; private Optional actions = Optional.empty(); - private Optional tabOrder = Optional.empty(); + private Optional tabOrder = Optional.empty(); private Optional label = Optional.empty(); @@ -278,7 +278,7 @@ public static final class Builder private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItem other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItem other) { index(other.getIndex()); ref(other.getRef()); label(other.getLabel()); @@ -308,7 +308,7 @@ public SizeStage ref(@NotNull PageRef ref) { @java.lang.Override @JsonSetter("size") - public RotationStage size(@NotNull DocPagesReorder200ResponseLayoutPagesItemSize size) { + public RotationStage size(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemSize size) { this.size = Objects.requireNonNull(size, "size must not be null"); return this; } @@ -329,14 +329,14 @@ public BoxesStage userUnit(double userUnit) { @java.lang.Override @JsonSetter("boxes") - public PdfCropBoxStage boxes(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxes boxes) { + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxes boxes) { this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); return this; } @java.lang.Override @JsonSetter("pdfCropBox") - public _FinalStage pdfCropBox(@NotNull DocPagesReorder200ResponseLayoutPagesItemPdfCropBox pdfCropBox) { + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox pdfCropBox) { this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); return this; } @@ -355,7 +355,7 @@ public _FinalStage actions(Optional actions) { } @java.lang.Override - public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Nullable tabOrder) { if (tabOrder.isNull()) { this.tabOrder = null; } else if (tabOrder.isEmpty()) { @@ -367,14 +367,14 @@ public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Optional tabOrder) { this.tabOrder = tabOrder; return this; } @@ -405,8 +405,8 @@ public _FinalStage label(Optional label) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItem build() { - return new DocPagesReorder200ResponseLayoutPagesItem( + public ChangeItemPagesInsertBlankLayoutPagesItem build() { + return new ChangeItemPagesInsertBlankLayoutPagesItem( index, ref, label, diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxes.java similarity index 63% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxes.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxes.java index 77f457f..f0edfe9 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxes.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxes.java @@ -17,26 +17,26 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxes.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxes { - private final DocPagesReorder200ResponseLayoutPagesItemBoxesMedia media; +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxes { + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia media; - private final DocPagesReorder200ResponseLayoutPagesItemBoxesCrop crop; + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop crop; - private final DocPagesReorder200ResponseLayoutPagesItemBoxesBleed bleed; + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed bleed; - private final DocPagesReorder200ResponseLayoutPagesItemBoxesTrim trim; + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim trim; - private final DocPagesReorder200ResponseLayoutPagesItemBoxesArt art; + private final ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt art; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxes( - DocPagesReorder200ResponseLayoutPagesItemBoxesMedia media, - DocPagesReorder200ResponseLayoutPagesItemBoxesCrop crop, - DocPagesReorder200ResponseLayoutPagesItemBoxesBleed bleed, - DocPagesReorder200ResponseLayoutPagesItemBoxesTrim trim, - DocPagesReorder200ResponseLayoutPagesItemBoxesArt art, + private ChangeItemPagesInsertBlankLayoutPagesItemBoxes( + ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia media, + ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop crop, + ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim trim, + ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt art, Map additionalProperties) { this.media = media; this.crop = crop; @@ -47,35 +47,35 @@ private DocPagesReorder200ResponseLayoutPagesItemBoxes( } @JsonProperty("media") - public DocPagesReorder200ResponseLayoutPagesItemBoxesMedia getMedia() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia getMedia() { return media; } @JsonProperty("crop") - public DocPagesReorder200ResponseLayoutPagesItemBoxesCrop getCrop() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop getCrop() { return crop; } @JsonProperty("bleed") - public DocPagesReorder200ResponseLayoutPagesItemBoxesBleed getBleed() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed getBleed() { return bleed; } @JsonProperty("trim") - public DocPagesReorder200ResponseLayoutPagesItemBoxesTrim getTrim() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim getTrim() { return trim; } @JsonProperty("art") - public DocPagesReorder200ResponseLayoutPagesItemBoxesArt getArt() { + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt getArt() { return art; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxes - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxes) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxes + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxes) other); } @JsonAnyGetter @@ -83,7 +83,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxes other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxes other) { return media.equals(other.media) && crop.equals(other.crop) && bleed.equals(other.bleed) @@ -106,29 +106,29 @@ public static MediaStage builder() { } public interface MediaStage { - CropStage media(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesMedia media); + CropStage media(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia media); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxes other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxes other); } public interface CropStage { - BleedStage crop(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesCrop crop); + BleedStage crop(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop crop); } public interface BleedStage { - TrimStage bleed(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesBleed bleed); + TrimStage bleed(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed bleed); } public interface TrimStage { - ArtStage trim(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesTrim trim); + ArtStage trim(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim trim); } public interface ArtStage { - _FinalStage art(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesArt art); + _FinalStage art(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt art); } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxes build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxes build(); _FinalStage additionalProperty(String key, Object value); @@ -137,15 +137,15 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { - private DocPagesReorder200ResponseLayoutPagesItemBoxesMedia media; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia media; - private DocPagesReorder200ResponseLayoutPagesItemBoxesCrop crop; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop crop; - private DocPagesReorder200ResponseLayoutPagesItemBoxesBleed bleed; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed bleed; - private DocPagesReorder200ResponseLayoutPagesItemBoxesTrim trim; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim trim; - private DocPagesReorder200ResponseLayoutPagesItemBoxesArt art; + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt art; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -153,7 +153,7 @@ public static final class Builder implements MediaStage, CropStage, BleedStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxes other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxes other) { media(other.getMedia()); crop(other.getCrop()); bleed(other.getBleed()); @@ -164,42 +164,42 @@ public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxes other) { @java.lang.Override @JsonSetter("media") - public CropStage media(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesMedia media) { + public CropStage media(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia media) { this.media = Objects.requireNonNull(media, "media must not be null"); return this; } @java.lang.Override @JsonSetter("crop") - public BleedStage crop(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesCrop crop) { + public BleedStage crop(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop crop) { this.crop = Objects.requireNonNull(crop, "crop must not be null"); return this; } @java.lang.Override @JsonSetter("bleed") - public TrimStage bleed(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesBleed bleed) { + public TrimStage bleed(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed bleed) { this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); return this; } @java.lang.Override @JsonSetter("trim") - public ArtStage trim(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesTrim trim) { + public ArtStage trim(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim trim) { this.trim = Objects.requireNonNull(trim, "trim must not be null"); return this; } @java.lang.Override @JsonSetter("art") - public _FinalStage art(@NotNull DocPagesReorder200ResponseLayoutPagesItemBoxesArt art) { + public _FinalStage art(@NotNull ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt art) { this.art = Objects.requireNonNull(art, "art must not be null"); return this; } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxes build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxes( + public ChangeItemPagesInsertBlankLayoutPagesItemBoxes build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxes( media, crop, bleed, trim, art, additionalProperties); } diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesArt.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt.java index 41e2815..9fdcde7 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesArt.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxesArt.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxesArt { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemBoxesArt { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxesArt( + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxesArt - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxesArt) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxesArt other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesArt other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxesArt build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesArt other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxesArt build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesBleed.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed.java index f44156e..b48fe28 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesBleed.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxesBleed.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxesBleed { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemBoxesBleed { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxesBleed( + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxesBleed - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxesBleed) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxesBleed other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesBleed other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxesBleed build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesBleed other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxesBleed build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesCrop.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop.java index 1a73563..f83a526 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesCrop.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxesCrop.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxesCrop { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemBoxesCrop { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxesCrop( + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxesCrop - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxesCrop) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxesCrop other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesCrop other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxesCrop build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesCrop other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxesCrop build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesMedia.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia.java index 987a415..6063c05 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesMedia.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxesMedia.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxesMedia { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemBoxesMedia { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxesMedia( + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxesMedia - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxesMedia) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxesMedia other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesMedia other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxesMedia build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesMedia other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxesMedia build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesTrim.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim.java index 4dbc700..7d3d2ac 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemBoxesTrim.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemBoxesTrim.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemBoxesTrim { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim { private final double x; private final double y; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemBoxesTrim { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemBoxesTrim( + private ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim( double x, double y, double width, double height, Map additionalProperties) { this.x = x; this.y = y; @@ -60,8 +60,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemBoxesTrim - && equalTo((DocPagesReorder200ResponseLayoutPagesItemBoxesTrim) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemBoxesTrim other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim other) { return x == other.x && y == other.y && width == other.width && height == other.height; } @@ -90,7 +90,7 @@ public static XStage builder() { public interface XStage { YStage x(double x); - Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesTrim other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim other); } public interface YStage { @@ -106,7 +106,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemBoxesTrim build(); + ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements XStage, YStage, WidthStage, HeightS private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemBoxesTrim other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim other) { x(other.getX()); y(other.getY()); width(other.getWidth()); @@ -166,8 +166,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemBoxesTrim build() { - return new DocPagesReorder200ResponseLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox.java similarity index 86% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemPdfCropBox.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox.java index de39c54..66e3957 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemPdfCropBox.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemPdfCropBox.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemPdfCropBox { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox { private final double left; private final double bottom; @@ -28,7 +28,7 @@ public final class DocPagesReorder200ResponseLayoutPagesItemPdfCropBox { private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemPdfCropBox( + private ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox( double left, double bottom, double right, double top, Map additionalProperties) { this.left = left; this.bottom = bottom; @@ -60,8 +60,8 @@ public double getTop() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemPdfCropBox - && equalTo((DocPagesReorder200ResponseLayoutPagesItemPdfCropBox) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemPdfCropBox other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox other) { return left == other.left && bottom == other.bottom && right == other.right && top == other.top; } @@ -90,7 +90,7 @@ public static LeftStage builder() { public interface LeftStage { BottomStage left(double left); - Builder from(DocPagesReorder200ResponseLayoutPagesItemPdfCropBox other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox other); } public interface BottomStage { @@ -106,7 +106,7 @@ public interface TopStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemPdfCropBox build(); + ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements LeftStage, BottomStage, RightStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemPdfCropBox other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox other) { left(other.getLeft()); bottom(other.getBottom()); right(other.getRight()); @@ -166,8 +166,8 @@ public _FinalStage top(double top) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemPdfCropBox build() { - return new DocPagesReorder200ResponseLayoutPagesItemPdfCropBox( + public ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox( left, bottom, right, top, additionalProperties); } diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemSize.java similarity index 83% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemSize.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemSize.java index 09607bc..c41907e 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemSize.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemSize.java @@ -16,15 +16,15 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesReorder200ResponseLayoutPagesItemSize.Builder.class) -public final class DocPagesReorder200ResponseLayoutPagesItemSize { +@JsonDeserialize(builder = ChangeItemPagesInsertBlankLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesInsertBlankLayoutPagesItemSize { private final double width; private final double height; private final Map additionalProperties; - private DocPagesReorder200ResponseLayoutPagesItemSize( + private ChangeItemPagesInsertBlankLayoutPagesItemSize( double width, double height, Map additionalProperties) { this.width = width; this.height = height; @@ -44,8 +44,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesReorder200ResponseLayoutPagesItemSize - && equalTo((DocPagesReorder200ResponseLayoutPagesItemSize) other); + return other instanceof ChangeItemPagesInsertBlankLayoutPagesItemSize + && equalTo((ChangeItemPagesInsertBlankLayoutPagesItemSize) other); } @JsonAnyGetter @@ -53,7 +53,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesReorder200ResponseLayoutPagesItemSize other) { + private boolean equalTo(ChangeItemPagesInsertBlankLayoutPagesItemSize other) { return width == other.width && height == other.height; } @@ -74,7 +74,7 @@ public static WidthStage builder() { public interface WidthStage { HeightStage width(double width); - Builder from(DocPagesReorder200ResponseLayoutPagesItemSize other); + Builder from(ChangeItemPagesInsertBlankLayoutPagesItemSize other); } public interface HeightStage { @@ -82,7 +82,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesReorder200ResponseLayoutPagesItemSize build(); + ChangeItemPagesInsertBlankLayoutPagesItemSize build(); _FinalStage additionalProperty(String key, Object value); @@ -101,7 +101,7 @@ public static final class Builder implements WidthStage, HeightStage, _FinalStag private Builder() {} @java.lang.Override - public Builder from(DocPagesReorder200ResponseLayoutPagesItemSize other) { + public Builder from(ChangeItemPagesInsertBlankLayoutPagesItemSize other) { width(other.getWidth()); height(other.getHeight()); return this; @@ -122,8 +122,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesReorder200ResponseLayoutPagesItemSize build() { - return new DocPagesReorder200ResponseLayoutPagesItemSize(width, height, additionalProperties); + public ChangeItemPagesInsertBlankLayoutPagesItemSize build() { + return new ChangeItemPagesInsertBlankLayoutPagesItemSize(width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemTabOrder.java similarity index 69% rename from src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemTabOrder.java rename to src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemTabOrder.java index 93412b9..06f4752 100644 --- a/src/main/java/api/types/DocPagesReorder200ResponseLayoutPagesItemTabOrder.java +++ b/src/main/java/api/types/ChangeItemPagesInsertBlankLayoutPagesItemTabOrder.java @@ -6,27 +6,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class DocPagesReorder200ResponseLayoutPagesItemTabOrder { - public static final DocPagesReorder200ResponseLayoutPagesItemTabOrder WIDGETS = - new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); +public final class ChangeItemPagesInsertBlankLayoutPagesItemTabOrder { + public static final ChangeItemPagesInsertBlankLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); - public static final DocPagesReorder200ResponseLayoutPagesItemTabOrder COLUMNS = - new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + public static final ChangeItemPagesInsertBlankLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); - public static final DocPagesReorder200ResponseLayoutPagesItemTabOrder ANNOTATIONS = - new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + public static final ChangeItemPagesInsertBlankLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); - public static final DocPagesReorder200ResponseLayoutPagesItemTabOrder ROWS = - new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.ROWS, "rows"); + public static final ChangeItemPagesInsertBlankLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.ROWS, "rows"); - public static final DocPagesReorder200ResponseLayoutPagesItemTabOrder STRUCTURE = - new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + public static final ChangeItemPagesInsertBlankLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); private final Value value; private final String string; - DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value value, String string) { + ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value value, String string) { this.value = value; this.string = string; } @@ -44,8 +44,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof DocPagesReorder200ResponseLayoutPagesItemTabOrder - && this.string.equals(((DocPagesReorder200ResponseLayoutPagesItemTabOrder) other).string)); + || (other instanceof ChangeItemPagesInsertBlankLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesInsertBlankLayoutPagesItemTabOrder) other).string)); } @java.lang.Override @@ -72,7 +72,7 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DocPagesReorder200ResponseLayoutPagesItemTabOrder valueOf(String value) { + public static ChangeItemPagesInsertBlankLayoutPagesItemTabOrder valueOf(String value) { switch (value) { case "widgets": return WIDGETS; @@ -85,7 +85,7 @@ public static DocPagesReorder200ResponseLayoutPagesItemTabOrder valueOf(String v case "structure": return STRUCTURE; default: - return new DocPagesReorder200ResponseLayoutPagesItemTabOrder(Value.UNKNOWN, value); + return new ChangeItemPagesInsertBlankLayoutPagesItemTabOrder(Value.UNKNOWN, value); } } diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayout.java b/src/main/java/api/types/ChangeItemPagesInsertLayout.java similarity index 64% rename from src/main/java/api/types/DocPagesDelete200ResponseLayout.java rename to src/main/java/api/types/ChangeItemPagesInsertLayout.java index 449e3b0..5a24856 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayout.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayout.java @@ -19,20 +19,20 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayout.Builder.class) -public final class DocPagesDelete200ResponseLayout { +@JsonDeserialize(builder = ChangeItemPagesInsertLayout.Builder.class) +public final class ChangeItemPagesInsertLayout { private final int pageCount; - private final List pages; + private final List pages; - private final List namedPages; + private final List namedPages; private final Map additionalProperties; - private DocPagesDelete200ResponseLayout( + private ChangeItemPagesInsertLayout( int pageCount, - List pages, - List namedPages, + List pages, + List namedPages, Map additionalProperties) { this.pageCount = pageCount; this.pages = pages; @@ -46,19 +46,19 @@ public int getPageCount() { } @JsonProperty("pages") - public List getPages() { + public List getPages() { return pages; } @JsonProperty("namedPages") - public List getNamedPages() { + public List getNamedPages() { return namedPages; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayout && equalTo((DocPagesDelete200ResponseLayout) other); + return other instanceof ChangeItemPagesInsertLayout && equalTo((ChangeItemPagesInsertLayout) other); } @JsonAnyGetter @@ -66,7 +66,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayout other) { + private boolean equalTo(ChangeItemPagesInsertLayout other) { return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); } @@ -87,36 +87,36 @@ public static PageCountStage builder() { public interface PageCountStage { _FinalStage pageCount(int pageCount); - Builder from(DocPagesDelete200ResponseLayout other); + Builder from(ChangeItemPagesInsertLayout other); } public interface _FinalStage { - DocPagesDelete200ResponseLayout build(); + ChangeItemPagesInsertLayout build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - _FinalStage pages(List pages); + _FinalStage pages(List pages); - _FinalStage addPages(DocPagesDelete200ResponseLayoutPagesItem pages); + _FinalStage addPages(ChangeItemPagesInsertLayoutPagesItem pages); - _FinalStage addAllPages(List pages); + _FinalStage addAllPages(List pages); - _FinalStage namedPages(List namedPages); + _FinalStage namedPages(List namedPages); - _FinalStage addNamedPages(DocPagesDelete200ResponseLayoutNamedPagesItem namedPages); + _FinalStage addNamedPages(ChangeItemPagesInsertLayoutNamedPagesItem namedPages); - _FinalStage addAllNamedPages(List namedPages); + _FinalStage addAllNamedPages(List namedPages); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements PageCountStage, _FinalStage { private int pageCount; - private List namedPages = new ArrayList<>(); + private List namedPages = new ArrayList<>(); - private List pages = new ArrayList<>(); + private List pages = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -124,7 +124,7 @@ public static final class Builder implements PageCountStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayout other) { + public Builder from(ChangeItemPagesInsertLayout other) { pageCount(other.getPageCount()); pages(other.getPages()); namedPages(other.getNamedPages()); @@ -139,7 +139,7 @@ public _FinalStage pageCount(int pageCount) { } @java.lang.Override - public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage addAllNamedPages(List namedPages) { if (namedPages != null) { this.namedPages.addAll(namedPages); } @@ -147,14 +147,14 @@ public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage namedPages(List namedPages) { this.namedPages.clear(); if (namedPages != null) { this.namedPages.addAll(namedPages); @@ -163,7 +163,7 @@ public _FinalStage namedPages(List pages) { + public _FinalStage addAllPages(List pages) { if (pages != null) { this.pages.addAll(pages); } @@ -171,14 +171,14 @@ public _FinalStage addAllPages(List pa } @java.lang.Override - public _FinalStage addPages(DocPagesDelete200ResponseLayoutPagesItem pages) { + public _FinalStage addPages(ChangeItemPagesInsertLayoutPagesItem pages) { this.pages.add(pages); return this; } @java.lang.Override @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { + public _FinalStage pages(List pages) { this.pages.clear(); if (pages != null) { this.pages.addAll(pages); @@ -187,8 +187,8 @@ public _FinalStage pages(List pages) { } @java.lang.Override - public DocPagesDelete200ResponseLayout build() { - return new DocPagesDelete200ResponseLayout(pageCount, pages, namedPages, additionalProperties); + public ChangeItemPagesInsertLayout build() { + return new ChangeItemPagesInsertLayout(pageCount, pages, namedPages, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItem.java similarity index 71% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItem.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItem.java index 88e20f6..bcd8ca1 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItem.java @@ -17,17 +17,17 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutNamedPagesItem.Builder.class) -public final class DocPagesDelete200ResponseLayoutNamedPagesItem { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesInsertLayoutNamedPagesItem { private final String name; - private final DocPagesDelete200ResponseLayoutNamedPagesItemTarget target; + private final ChangeItemPagesInsertLayoutNamedPagesItemTarget target; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutNamedPagesItem( + private ChangeItemPagesInsertLayoutNamedPagesItem( String name, - DocPagesDelete200ResponseLayoutNamedPagesItemTarget target, + ChangeItemPagesInsertLayoutNamedPagesItemTarget target, Map additionalProperties) { this.name = name; this.target = target; @@ -40,15 +40,15 @@ public String getName() { } @JsonProperty("target") - public DocPagesDelete200ResponseLayoutNamedPagesItemTarget getTarget() { + public ChangeItemPagesInsertLayoutNamedPagesItemTarget getTarget() { return target; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutNamedPagesItem - && equalTo((DocPagesDelete200ResponseLayoutNamedPagesItem) other); + return other instanceof ChangeItemPagesInsertLayoutNamedPagesItem + && equalTo((ChangeItemPagesInsertLayoutNamedPagesItem) other); } @JsonAnyGetter @@ -56,7 +56,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutNamedPagesItem other) { + private boolean equalTo(ChangeItemPagesInsertLayoutNamedPagesItem other) { return name.equals(other.name) && target.equals(other.target); } @@ -77,15 +77,15 @@ public static NameStage builder() { public interface NameStage { TargetStage name(@NotNull String name); - Builder from(DocPagesDelete200ResponseLayoutNamedPagesItem other); + Builder from(ChangeItemPagesInsertLayoutNamedPagesItem other); } public interface TargetStage { - _FinalStage target(@NotNull DocPagesDelete200ResponseLayoutNamedPagesItemTarget target); + _FinalStage target(@NotNull ChangeItemPagesInsertLayoutNamedPagesItemTarget target); } public interface _FinalStage { - DocPagesDelete200ResponseLayoutNamedPagesItem build(); + ChangeItemPagesInsertLayoutNamedPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -96,7 +96,7 @@ public interface _FinalStage { public static final class Builder implements NameStage, TargetStage, _FinalStage { private String name; - private DocPagesDelete200ResponseLayoutNamedPagesItemTarget target; + private ChangeItemPagesInsertLayoutNamedPagesItemTarget target; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -104,7 +104,7 @@ public static final class Builder implements NameStage, TargetStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutNamedPagesItem other) { + public Builder from(ChangeItemPagesInsertLayoutNamedPagesItem other) { name(other.getName()); target(other.getTarget()); return this; @@ -119,14 +119,14 @@ public TargetStage name(@NotNull String name) { @java.lang.Override @JsonSetter("target") - public _FinalStage target(@NotNull DocPagesDelete200ResponseLayoutNamedPagesItemTarget target) { + public _FinalStage target(@NotNull ChangeItemPagesInsertLayoutNamedPagesItemTarget target) { this.target = Objects.requireNonNull(target, "target must not be null"); return this; } @java.lang.Override - public DocPagesDelete200ResponseLayoutNamedPagesItem build() { - return new DocPagesDelete200ResponseLayoutNamedPagesItem(name, target, additionalProperties); + public ChangeItemPagesInsertLayoutNamedPagesItem build() { + return new ChangeItemPagesInsertLayoutNamedPagesItem(name, target, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTarget.java similarity index 71% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTarget.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTarget.java index 085df8d..f60a6c5 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTarget.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTarget.java @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class DocPagesDelete200ResponseLayoutNamedPagesItemTarget { +public final class ChangeItemPagesInsertLayoutNamedPagesItemTarget { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private DocPagesDelete200ResponseLayoutNamedPagesItemTarget(Value value) { + private ChangeItemPagesInsertLayoutNamedPagesItemTarget(Value value) { this.value = value; } @@ -26,19 +26,19 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static DocPagesDelete200ResponseLayoutNamedPagesItemTarget page( - DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage value) { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTarget(new PageValue(value)); + public static ChangeItemPagesInsertLayoutNamedPagesItemTarget page( + ChangeItemPagesInsertLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesInsertLayoutNamedPagesItemTarget(new PageValue(value)); } - public static DocPagesDelete200ResponseLayoutNamedPagesItemTarget template( - DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate value) { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTarget(new TemplateValue(value)); + public static ChangeItemPagesInsertLayoutNamedPagesItemTarget template( + ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesInsertLayoutNamedPagesItemTarget(new TemplateValue(value)); } - public static DocPagesDelete200ResponseLayoutNamedPagesItemTarget dangling( - DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling value) { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTarget(new DanglingValue(value)); + public static ChangeItemPagesInsertLayoutNamedPagesItemTarget dangling( + ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesInsertLayoutNamedPagesItemTarget(new DanglingValue(value)); } public boolean isPage() { @@ -57,21 +57,21 @@ public boolean _isUnknown() { return value instanceof _UnknownValue; } - public Optional getPage() { + public Optional getPage() { if (isPage()) { return Optional.of(((PageValue) value).value); } return Optional.empty(); } - public Optional getTemplate() { + public Optional getTemplate() { if (isTemplate()) { return Optional.of(((TemplateValue) value).value); } return Optional.empty(); } - public Optional getDangling() { + public Optional getDangling() { if (isDangling()) { return Optional.of(((DanglingValue) value).value); } @@ -88,8 +88,8 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutNamedPagesItemTarget - && value.equals(((DocPagesDelete200ResponseLayoutNamedPagesItemTarget) other).value); + return other instanceof ChangeItemPagesInsertLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesInsertLayoutNamedPagesItemTarget) other).value); } @Override @@ -108,11 +108,11 @@ private Value getValue() { } public interface Visitor { - T visitPage(DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage page); + T visitPage(ChangeItemPagesInsertLayoutNamedPagesItemTargetPage page); - T visitTemplate(DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate template); + T visitTemplate(ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate template); - T visitDangling(DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling dangling); + T visitDangling(ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling dangling); T _visitUnknown(Object unknownType); } @@ -133,12 +133,12 @@ private interface Value { private static final class PageValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage value; + private ChangeItemPagesInsertLayoutNamedPagesItemTargetPage value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private PageValue() {} - private PageValue(DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage value) { + private PageValue(ChangeItemPagesInsertLayoutNamedPagesItemTargetPage value) { this.value = value; } @@ -164,7 +164,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesDelete200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -173,12 +173,12 @@ public String toString() { private static final class TemplateValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate value; + private ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private TemplateValue() {} - private TemplateValue(DocPagesDelete200ResponseLayoutNamedPagesItemTargetTemplate value) { + private TemplateValue(ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate value) { this.value = value; } @@ -204,7 +204,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesDelete200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -213,12 +213,12 @@ public String toString() { private static final class DanglingValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling value; + private ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private DanglingValue() {} - private DanglingValue(DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling value) { + private DanglingValue(ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling value) { this.value = value; } @@ -244,7 +244,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesDelete200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesInsertLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -280,7 +280,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesDelete200ResponseLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; + return "ChangeItemPagesInsertLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; } } } diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling.java similarity index 71% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling.java index 33d182f..caa3f38 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling.java @@ -13,18 +13,18 @@ import java.util.Map; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling.Builder.class) -public final class DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling { private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + private ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling(Map additionalProperties) { this.additionalProperties = additionalProperties; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling; + return other instanceof ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling; } @JsonAnyGetter @@ -48,12 +48,12 @@ public static final class Builder { private Builder() {} - public Builder from(DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling other) { + public Builder from(ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling other) { return this; } - public DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling build() { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTargetDangling(additionalProperties); + public ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesInsertLayoutNamedPagesItemTargetDangling(additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetPage.java similarity index 75% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetPage.java index a0e956c..4504e26 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetPage.java @@ -17,13 +17,13 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage.Builder.class) -public final class DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesInsertLayoutNamedPagesItemTargetPage { private final PageRef page; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage( + private ChangeItemPagesInsertLayoutNamedPagesItemTargetPage( PageRef page, Map additionalProperties) { this.page = page; this.additionalProperties = additionalProperties; @@ -37,8 +37,8 @@ public PageRef getPage() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage - && equalTo((DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage) other); + return other instanceof ChangeItemPagesInsertLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesInsertLayoutNamedPagesItemTargetPage) other); } @JsonAnyGetter @@ -46,7 +46,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage other) { + private boolean equalTo(ChangeItemPagesInsertLayoutNamedPagesItemTargetPage other) { return page.equals(other.page); } @@ -67,11 +67,11 @@ public static PageStage builder() { public interface PageStage { _FinalStage page(@NotNull PageRef page); - Builder from(DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage other); + Builder from(ChangeItemPagesInsertLayoutNamedPagesItemTargetPage other); } public interface _FinalStage { - DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage build(); + ChangeItemPagesInsertLayoutNamedPagesItemTargetPage build(); _FinalStage additionalProperty(String key, Object value); @@ -88,7 +88,7 @@ public static final class Builder implements PageStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage other) { + public Builder from(ChangeItemPagesInsertLayoutNamedPagesItemTargetPage other) { page(other.getPage()); return this; } @@ -101,8 +101,8 @@ public _FinalStage page(@NotNull PageRef page) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage build() { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTargetPage(page, additionalProperties); + public ChangeItemPagesInsertLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesInsertLayoutNamedPagesItemTargetPage(page, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate.java similarity index 74% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate.java index 13ab882..a552adb 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate.java @@ -16,13 +16,13 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate.Builder.class) -public final class DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate { private final int objectNumber; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate( + private ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate( int objectNumber, Map additionalProperties) { this.objectNumber = objectNumber; this.additionalProperties = additionalProperties; @@ -36,8 +36,8 @@ public int getObjectNumber() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate - && equalTo((DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate) other); + return other instanceof ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate) other); } @JsonAnyGetter @@ -45,7 +45,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate other) { + private boolean equalTo(ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate other) { return objectNumber == other.objectNumber; } @@ -66,11 +66,11 @@ public static ObjectNumberStage builder() { public interface ObjectNumberStage { _FinalStage objectNumber(int objectNumber); - Builder from(DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate other); + Builder from(ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate other); } public interface _FinalStage { - DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate build(); + ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate build(); _FinalStage additionalProperty(String key, Object value); @@ -87,7 +87,7 @@ public static final class Builder implements ObjectNumberStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate other) { + public Builder from(ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate other) { objectNumber(other.getObjectNumber()); return this; } @@ -100,8 +100,8 @@ public _FinalStage objectNumber(int objectNumber) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate build() { - return new DocPagesInsert200ResponseLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + public ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesInsertLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItem.java similarity index 76% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItem.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItem.java index 7aa555e..ebbba0b 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItem.java @@ -22,40 +22,40 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItem.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItem { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItem.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItem { private final int index; private final PageRef ref; private final Optional label; - private final DocPagesInsert200ResponseLayoutPagesItemSize size; + private final ChangeItemPagesInsertLayoutPagesItemSize size; private final double rotation; private final double userUnit; - private final Optional tabOrder; + private final Optional tabOrder; - private final DocPagesInsert200ResponseLayoutPagesItemBoxes boxes; + private final ChangeItemPagesInsertLayoutPagesItemBoxes boxes; - private final DocPagesInsert200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private final ChangeItemPagesInsertLayoutPagesItemPdfCropBox pdfCropBox; private final Optional actions; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutPagesItem( + private ChangeItemPagesInsertLayoutPagesItem( int index, PageRef ref, Optional label, - DocPagesInsert200ResponseLayoutPagesItemSize size, + ChangeItemPagesInsertLayoutPagesItemSize size, double rotation, double userUnit, - Optional tabOrder, - DocPagesInsert200ResponseLayoutPagesItemBoxes boxes, - DocPagesInsert200ResponseLayoutPagesItemPdfCropBox pdfCropBox, + Optional tabOrder, + ChangeItemPagesInsertLayoutPagesItemBoxes boxes, + ChangeItemPagesInsertLayoutPagesItemPdfCropBox pdfCropBox, Optional actions, Map additionalProperties) { this.index = index; @@ -90,7 +90,7 @@ public Optional getLabel() { } @JsonProperty("size") - public DocPagesInsert200ResponseLayoutPagesItemSize getSize() { + public ChangeItemPagesInsertLayoutPagesItemSize getSize() { return size; } @@ -105,7 +105,7 @@ public double getUserUnit() { } @JsonIgnore - public Optional getTabOrder() { + public Optional getTabOrder() { if (tabOrder == null) { return Optional.empty(); } @@ -113,12 +113,12 @@ public Optional getTabOrder() } @JsonProperty("boxes") - public DocPagesInsert200ResponseLayoutPagesItemBoxes getBoxes() { + public ChangeItemPagesInsertLayoutPagesItemBoxes getBoxes() { return boxes; } @JsonProperty("pdfCropBox") - public DocPagesInsert200ResponseLayoutPagesItemPdfCropBox getPdfCropBox() { + public ChangeItemPagesInsertLayoutPagesItemPdfCropBox getPdfCropBox() { return pdfCropBox; } @@ -135,15 +135,15 @@ private Optional _getLabel() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("tabOrder") - private Optional _getTabOrder() { + private Optional _getTabOrder() { return tabOrder; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItem - && equalTo((DocPagesInsert200ResponseLayoutPagesItem) other); + return other instanceof ChangeItemPagesInsertLayoutPagesItem + && equalTo((ChangeItemPagesInsertLayoutPagesItem) other); } @JsonAnyGetter @@ -151,7 +151,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItem other) { + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItem other) { return index == other.index && ref.equals(other.ref) && label.equals(other.label) @@ -191,7 +191,7 @@ public static IndexStage builder() { public interface IndexStage { RefStage index(int index); - Builder from(DocPagesInsert200ResponseLayoutPagesItem other); + Builder from(ChangeItemPagesInsertLayoutPagesItem other); } public interface RefStage { @@ -199,7 +199,7 @@ public interface RefStage { } public interface SizeStage { - RotationStage size(@NotNull DocPagesInsert200ResponseLayoutPagesItemSize size); + RotationStage size(@NotNull ChangeItemPagesInsertLayoutPagesItemSize size); } public interface RotationStage { @@ -211,15 +211,15 @@ public interface UserUnitStage { } public interface BoxesStage { - PdfCropBoxStage boxes(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxes boxes); + PdfCropBoxStage boxes(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxes boxes); } public interface PdfCropBoxStage { - _FinalStage pdfCropBox(@NotNull DocPagesInsert200ResponseLayoutPagesItemPdfCropBox pdfCropBox); + _FinalStage pdfCropBox(@NotNull ChangeItemPagesInsertLayoutPagesItemPdfCropBox pdfCropBox); } public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItem build(); + ChangeItemPagesInsertLayoutPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -231,11 +231,11 @@ public interface _FinalStage { _FinalStage label(Nullable label); - _FinalStage tabOrder(Optional tabOrder); + _FinalStage tabOrder(Optional tabOrder); - _FinalStage tabOrder(DocPagesInsert200ResponseLayoutPagesItemTabOrder tabOrder); + _FinalStage tabOrder(ChangeItemPagesInsertLayoutPagesItemTabOrder tabOrder); - _FinalStage tabOrder(Nullable tabOrder); + _FinalStage tabOrder(Nullable tabOrder); _FinalStage actions(Optional actions); @@ -256,19 +256,19 @@ public static final class Builder private PageRef ref; - private DocPagesInsert200ResponseLayoutPagesItemSize size; + private ChangeItemPagesInsertLayoutPagesItemSize size; private double rotation; private double userUnit; - private DocPagesInsert200ResponseLayoutPagesItemBoxes boxes; + private ChangeItemPagesInsertLayoutPagesItemBoxes boxes; - private DocPagesInsert200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private ChangeItemPagesInsertLayoutPagesItemPdfCropBox pdfCropBox; private Optional actions = Optional.empty(); - private Optional tabOrder = Optional.empty(); + private Optional tabOrder = Optional.empty(); private Optional label = Optional.empty(); @@ -278,7 +278,7 @@ public static final class Builder private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItem other) { + public Builder from(ChangeItemPagesInsertLayoutPagesItem other) { index(other.getIndex()); ref(other.getRef()); label(other.getLabel()); @@ -308,7 +308,7 @@ public SizeStage ref(@NotNull PageRef ref) { @java.lang.Override @JsonSetter("size") - public RotationStage size(@NotNull DocPagesInsert200ResponseLayoutPagesItemSize size) { + public RotationStage size(@NotNull ChangeItemPagesInsertLayoutPagesItemSize size) { this.size = Objects.requireNonNull(size, "size must not be null"); return this; } @@ -329,14 +329,14 @@ public BoxesStage userUnit(double userUnit) { @java.lang.Override @JsonSetter("boxes") - public PdfCropBoxStage boxes(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxes boxes) { + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxes boxes) { this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); return this; } @java.lang.Override @JsonSetter("pdfCropBox") - public _FinalStage pdfCropBox(@NotNull DocPagesInsert200ResponseLayoutPagesItemPdfCropBox pdfCropBox) { + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesInsertLayoutPagesItemPdfCropBox pdfCropBox) { this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); return this; } @@ -355,7 +355,7 @@ public _FinalStage actions(Optional actions) { } @java.lang.Override - public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Nullable tabOrder) { if (tabOrder.isNull()) { this.tabOrder = null; } else if (tabOrder.isEmpty()) { @@ -367,14 +367,14 @@ public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Optional tabOrder) { this.tabOrder = tabOrder; return this; } @@ -405,8 +405,8 @@ public _FinalStage label(Optional label) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItem build() { - return new DocPagesInsert200ResponseLayoutPagesItem( + public ChangeItemPagesInsertLayoutPagesItem build() { + return new ChangeItemPagesInsertLayoutPagesItem( index, ref, label, diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxes.java similarity index 57% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxes.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxes.java index f1c08ca..552f94c 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxes.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxes.java @@ -17,26 +17,26 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxes.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxes { - private final DocPagesDelete200ResponseLayoutPagesItemBoxesMedia media; +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxes { + private final ChangeItemPagesInsertLayoutPagesItemBoxesMedia media; - private final DocPagesDelete200ResponseLayoutPagesItemBoxesCrop crop; + private final ChangeItemPagesInsertLayoutPagesItemBoxesCrop crop; - private final DocPagesDelete200ResponseLayoutPagesItemBoxesBleed bleed; + private final ChangeItemPagesInsertLayoutPagesItemBoxesBleed bleed; - private final DocPagesDelete200ResponseLayoutPagesItemBoxesTrim trim; + private final ChangeItemPagesInsertLayoutPagesItemBoxesTrim trim; - private final DocPagesDelete200ResponseLayoutPagesItemBoxesArt art; + private final ChangeItemPagesInsertLayoutPagesItemBoxesArt art; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemBoxes( - DocPagesDelete200ResponseLayoutPagesItemBoxesMedia media, - DocPagesDelete200ResponseLayoutPagesItemBoxesCrop crop, - DocPagesDelete200ResponseLayoutPagesItemBoxesBleed bleed, - DocPagesDelete200ResponseLayoutPagesItemBoxesTrim trim, - DocPagesDelete200ResponseLayoutPagesItemBoxesArt art, + private ChangeItemPagesInsertLayoutPagesItemBoxes( + ChangeItemPagesInsertLayoutPagesItemBoxesMedia media, + ChangeItemPagesInsertLayoutPagesItemBoxesCrop crop, + ChangeItemPagesInsertLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesInsertLayoutPagesItemBoxesTrim trim, + ChangeItemPagesInsertLayoutPagesItemBoxesArt art, Map additionalProperties) { this.media = media; this.crop = crop; @@ -47,35 +47,35 @@ private DocPagesDelete200ResponseLayoutPagesItemBoxes( } @JsonProperty("media") - public DocPagesDelete200ResponseLayoutPagesItemBoxesMedia getMedia() { + public ChangeItemPagesInsertLayoutPagesItemBoxesMedia getMedia() { return media; } @JsonProperty("crop") - public DocPagesDelete200ResponseLayoutPagesItemBoxesCrop getCrop() { + public ChangeItemPagesInsertLayoutPagesItemBoxesCrop getCrop() { return crop; } @JsonProperty("bleed") - public DocPagesDelete200ResponseLayoutPagesItemBoxesBleed getBleed() { + public ChangeItemPagesInsertLayoutPagesItemBoxesBleed getBleed() { return bleed; } @JsonProperty("trim") - public DocPagesDelete200ResponseLayoutPagesItemBoxesTrim getTrim() { + public ChangeItemPagesInsertLayoutPagesItemBoxesTrim getTrim() { return trim; } @JsonProperty("art") - public DocPagesDelete200ResponseLayoutPagesItemBoxesArt getArt() { + public ChangeItemPagesInsertLayoutPagesItemBoxesArt getArt() { return art; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxes - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxes) other); + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxes + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxes) other); } @JsonAnyGetter @@ -83,7 +83,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxes other) { + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxes other) { return media.equals(other.media) && crop.equals(other.crop) && bleed.equals(other.bleed) @@ -106,29 +106,29 @@ public static MediaStage builder() { } public interface MediaStage { - CropStage media(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesMedia media); + CropStage media(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesMedia media); - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxes other); + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxes other); } public interface CropStage { - BleedStage crop(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesCrop crop); + BleedStage crop(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesCrop crop); } public interface BleedStage { - TrimStage bleed(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesBleed bleed); + TrimStage bleed(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesBleed bleed); } public interface TrimStage { - ArtStage trim(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesTrim trim); + ArtStage trim(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesTrim trim); } public interface ArtStage { - _FinalStage art(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesArt art); + _FinalStage art(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesArt art); } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxes build(); + ChangeItemPagesInsertLayoutPagesItemBoxes build(); _FinalStage additionalProperty(String key, Object value); @@ -137,15 +137,15 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { - private DocPagesDelete200ResponseLayoutPagesItemBoxesMedia media; + private ChangeItemPagesInsertLayoutPagesItemBoxesMedia media; - private DocPagesDelete200ResponseLayoutPagesItemBoxesCrop crop; + private ChangeItemPagesInsertLayoutPagesItemBoxesCrop crop; - private DocPagesDelete200ResponseLayoutPagesItemBoxesBleed bleed; + private ChangeItemPagesInsertLayoutPagesItemBoxesBleed bleed; - private DocPagesDelete200ResponseLayoutPagesItemBoxesTrim trim; + private ChangeItemPagesInsertLayoutPagesItemBoxesTrim trim; - private DocPagesDelete200ResponseLayoutPagesItemBoxesArt art; + private ChangeItemPagesInsertLayoutPagesItemBoxesArt art; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -153,7 +153,7 @@ public static final class Builder implements MediaStage, CropStage, BleedStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxes other) { + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxes other) { media(other.getMedia()); crop(other.getCrop()); bleed(other.getBleed()); @@ -164,43 +164,42 @@ public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxes other) { @java.lang.Override @JsonSetter("media") - public CropStage media(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesMedia media) { + public CropStage media(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesMedia media) { this.media = Objects.requireNonNull(media, "media must not be null"); return this; } @java.lang.Override @JsonSetter("crop") - public BleedStage crop(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesCrop crop) { + public BleedStage crop(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesCrop crop) { this.crop = Objects.requireNonNull(crop, "crop must not be null"); return this; } @java.lang.Override @JsonSetter("bleed") - public TrimStage bleed(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesBleed bleed) { + public TrimStage bleed(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesBleed bleed) { this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); return this; } @java.lang.Override @JsonSetter("trim") - public ArtStage trim(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesTrim trim) { + public ArtStage trim(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesTrim trim) { this.trim = Objects.requireNonNull(trim, "trim must not be null"); return this; } @java.lang.Override @JsonSetter("art") - public _FinalStage art(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxesArt art) { + public _FinalStage art(@NotNull ChangeItemPagesInsertLayoutPagesItemBoxesArt art) { this.art = Objects.requireNonNull(art, "art must not be null"); return this; } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxes build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxes( - media, crop, bleed, trim, art, additionalProperties); + public ChangeItemPagesInsertLayoutPagesItemBoxes build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxes(media, crop, bleed, trim, art, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesArt.java new file mode 100644 index 0000000..21f116c --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesArt.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxesArt { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesInsertLayoutPagesItemBoxesArt( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxesArt) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxesArt other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesArt other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesInsertLayoutPagesItemBoxesArt build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesArt other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesInsertLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesBleed.java new file mode 100644 index 0000000..e0b63dc --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesBleed.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxesBleed { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesInsertLayoutPagesItemBoxesBleed( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxesBleed) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxesBleed other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesBleed other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesInsertLayoutPagesItemBoxesBleed build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesBleed other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesInsertLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesCrop.java new file mode 100644 index 0000000..fbe860b --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesCrop.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxesCrop { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesInsertLayoutPagesItemBoxesCrop( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxesCrop) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxesCrop other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesCrop other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesInsertLayoutPagesItemBoxesCrop build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesCrop other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesInsertLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesMedia.java new file mode 100644 index 0000000..d7bfc7e --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesMedia.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxesMedia { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesInsertLayoutPagesItemBoxesMedia( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxesMedia) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxesMedia other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesMedia other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesInsertLayoutPagesItemBoxesMedia build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesMedia other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesInsertLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesTrim.java new file mode 100644 index 0000000..36cdee9 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemBoxesTrim.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemBoxesTrim { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesInsertLayoutPagesItemBoxesTrim( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesInsertLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesInsertLayoutPagesItemBoxesTrim) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemBoxesTrim other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesTrim other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesInsertLayoutPagesItemBoxesTrim build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesInsertLayoutPagesItemBoxesTrim other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesInsertLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesInsertLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemPdfCropBox.java similarity index 82% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemPdfCropBox.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemPdfCropBox.java index 874cb3b..8f11b91 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemPdfCropBox.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemPdfCropBox.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemPdfCropBox.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemPdfCropBox { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemPdfCropBox { private final double left; private final double bottom; @@ -28,7 +28,7 @@ public final class DocPagesInsert200ResponseLayoutPagesItemPdfCropBox { private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutPagesItemPdfCropBox( + private ChangeItemPagesInsertLayoutPagesItemPdfCropBox( double left, double bottom, double right, double top, Map additionalProperties) { this.left = left; this.bottom = bottom; @@ -60,8 +60,8 @@ public double getTop() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemPdfCropBox - && equalTo((DocPagesInsert200ResponseLayoutPagesItemPdfCropBox) other); + return other instanceof ChangeItemPagesInsertLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesInsertLayoutPagesItemPdfCropBox) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemPdfCropBox other) { + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemPdfCropBox other) { return left == other.left && bottom == other.bottom && right == other.right && top == other.top; } @@ -90,7 +90,7 @@ public static LeftStage builder() { public interface LeftStage { BottomStage left(double left); - Builder from(DocPagesInsert200ResponseLayoutPagesItemPdfCropBox other); + Builder from(ChangeItemPagesInsertLayoutPagesItemPdfCropBox other); } public interface BottomStage { @@ -106,7 +106,7 @@ public interface TopStage { } public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemPdfCropBox build(); + ChangeItemPagesInsertLayoutPagesItemPdfCropBox build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements LeftStage, BottomStage, RightStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemPdfCropBox other) { + public Builder from(ChangeItemPagesInsertLayoutPagesItemPdfCropBox other) { left(other.getLeft()); bottom(other.getBottom()); right(other.getRight()); @@ -166,9 +166,8 @@ public _FinalStage top(double top) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemPdfCropBox build() { - return new DocPagesInsert200ResponseLayoutPagesItemPdfCropBox( - left, bottom, right, top, additionalProperties); + public ChangeItemPagesInsertLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesInsertLayoutPagesItemPdfCropBox(left, bottom, right, top, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemSize.java similarity index 80% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemSize.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemSize.java index c097164..e509b6f 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemSize.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemSize.java @@ -16,15 +16,15 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemSize.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemSize { +@JsonDeserialize(builder = ChangeItemPagesInsertLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesInsertLayoutPagesItemSize { private final double width; private final double height; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutPagesItemSize( + private ChangeItemPagesInsertLayoutPagesItemSize( double width, double height, Map additionalProperties) { this.width = width; this.height = height; @@ -44,8 +44,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemSize - && equalTo((DocPagesInsert200ResponseLayoutPagesItemSize) other); + return other instanceof ChangeItemPagesInsertLayoutPagesItemSize + && equalTo((ChangeItemPagesInsertLayoutPagesItemSize) other); } @JsonAnyGetter @@ -53,7 +53,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemSize other) { + private boolean equalTo(ChangeItemPagesInsertLayoutPagesItemSize other) { return width == other.width && height == other.height; } @@ -74,7 +74,7 @@ public static WidthStage builder() { public interface WidthStage { HeightStage width(double width); - Builder from(DocPagesInsert200ResponseLayoutPagesItemSize other); + Builder from(ChangeItemPagesInsertLayoutPagesItemSize other); } public interface HeightStage { @@ -82,7 +82,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemSize build(); + ChangeItemPagesInsertLayoutPagesItemSize build(); _FinalStage additionalProperty(String key, Object value); @@ -101,7 +101,7 @@ public static final class Builder implements WidthStage, HeightStage, _FinalStag private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemSize other) { + public Builder from(ChangeItemPagesInsertLayoutPagesItemSize other) { width(other.getWidth()); height(other.getHeight()); return this; @@ -122,8 +122,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemSize build() { - return new DocPagesInsert200ResponseLayoutPagesItemSize(width, height, additionalProperties); + public ChangeItemPagesInsertLayoutPagesItemSize build() { + return new ChangeItemPagesInsertLayoutPagesItemSize(width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemTabOrder.java similarity index 59% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemTabOrder.java rename to src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemTabOrder.java index 67700e1..6ebfa5f 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemTabOrder.java +++ b/src/main/java/api/types/ChangeItemPagesInsertLayoutPagesItemTabOrder.java @@ -6,27 +6,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class DocPagesDelete200ResponseLayoutPagesItemTabOrder { - public static final DocPagesDelete200ResponseLayoutPagesItemTabOrder WIDGETS = - new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); +public final class ChangeItemPagesInsertLayoutPagesItemTabOrder { + public static final ChangeItemPagesInsertLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); - public static final DocPagesDelete200ResponseLayoutPagesItemTabOrder COLUMNS = - new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + public static final ChangeItemPagesInsertLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); - public static final DocPagesDelete200ResponseLayoutPagesItemTabOrder ANNOTATIONS = - new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + public static final ChangeItemPagesInsertLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); - public static final DocPagesDelete200ResponseLayoutPagesItemTabOrder ROWS = - new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.ROWS, "rows"); + public static final ChangeItemPagesInsertLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.ROWS, "rows"); - public static final DocPagesDelete200ResponseLayoutPagesItemTabOrder STRUCTURE = - new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + public static final ChangeItemPagesInsertLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); private final Value value; private final String string; - DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value value, String string) { + ChangeItemPagesInsertLayoutPagesItemTabOrder(Value value, String string) { this.value = value; this.string = string; } @@ -44,8 +44,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof DocPagesDelete200ResponseLayoutPagesItemTabOrder - && this.string.equals(((DocPagesDelete200ResponseLayoutPagesItemTabOrder) other).string)); + || (other instanceof ChangeItemPagesInsertLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesInsertLayoutPagesItemTabOrder) other).string)); } @java.lang.Override @@ -72,7 +72,7 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DocPagesDelete200ResponseLayoutPagesItemTabOrder valueOf(String value) { + public static ChangeItemPagesInsertLayoutPagesItemTabOrder valueOf(String value) { switch (value) { case "widgets": return WIDGETS; @@ -85,7 +85,7 @@ public static DocPagesDelete200ResponseLayoutPagesItemTabOrder valueOf(String va case "structure": return STRUCTURE; default: - return new DocPagesDelete200ResponseLayoutPagesItemTabOrder(Value.UNKNOWN, value); + return new ChangeItemPagesInsertLayoutPagesItemTabOrder(Value.UNKNOWN, value); } } diff --git a/src/main/java/api/types/ChangeItemPagesReorder.java b/src/main/java/api/types/ChangeItemPagesReorder.java new file mode 100644 index 0000000..797c15c --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorder.java @@ -0,0 +1,188 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorder.Builder.class) +public final class ChangeItemPagesReorder { + private final List pages; + + private final ChangeItemPagesReorderLayout layout; + + private final MutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemPagesReorder( + List pages, + ChangeItemPagesReorderLayout layout, + MutationMeta meta, + Map additionalProperties) { + this.pages = pages; + this.layout = layout; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("layout") + public ChangeItemPagesReorderLayout getLayout() { + return layout; + } + + @JsonProperty("meta") + public MutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorder && equalTo((ChangeItemPagesReorder) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorder other) { + return pages.equals(other.pages) && layout.equals(other.layout) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages, this.layout, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LayoutStage builder() { + return new Builder(); + } + + public interface LayoutStage { + MetaStage layout(@NotNull ChangeItemPagesReorderLayout layout); + + Builder from(ChangeItemPagesReorder other); + } + + public interface MetaStage { + _FinalStage meta(@NotNull MutationMeta meta); + } + + public interface _FinalStage { + ChangeItemPagesReorder build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(PageRef pages); + + _FinalStage addAllPages(List pages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LayoutStage, MetaStage, _FinalStage { + private ChangeItemPagesReorderLayout layout; + + private MutationMeta meta; + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorder other) { + pages(other.getPages()); + layout(other.getLayout()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("layout") + public MetaStage layout(@NotNull ChangeItemPagesReorderLayout layout) { + this.layout = Objects.requireNonNull(layout, "layout must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull MutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeItemPagesReorder build() { + return new ChangeItemPagesReorder(pages, layout, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayout.java b/src/main/java/api/types/ChangeItemPagesReorderLayout.java similarity index 64% rename from src/main/java/api/types/DocPagesInsert200ResponseLayout.java rename to src/main/java/api/types/ChangeItemPagesReorderLayout.java index 9711a0a..4c6a5a8 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayout.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayout.java @@ -19,20 +19,20 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayout.Builder.class) -public final class DocPagesInsert200ResponseLayout { +@JsonDeserialize(builder = ChangeItemPagesReorderLayout.Builder.class) +public final class ChangeItemPagesReorderLayout { private final int pageCount; - private final List pages; + private final List pages; - private final List namedPages; + private final List namedPages; private final Map additionalProperties; - private DocPagesInsert200ResponseLayout( + private ChangeItemPagesReorderLayout( int pageCount, - List pages, - List namedPages, + List pages, + List namedPages, Map additionalProperties) { this.pageCount = pageCount; this.pages = pages; @@ -46,19 +46,19 @@ public int getPageCount() { } @JsonProperty("pages") - public List getPages() { + public List getPages() { return pages; } @JsonProperty("namedPages") - public List getNamedPages() { + public List getNamedPages() { return namedPages; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayout && equalTo((DocPagesInsert200ResponseLayout) other); + return other instanceof ChangeItemPagesReorderLayout && equalTo((ChangeItemPagesReorderLayout) other); } @JsonAnyGetter @@ -66,7 +66,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayout other) { + private boolean equalTo(ChangeItemPagesReorderLayout other) { return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); } @@ -87,36 +87,36 @@ public static PageCountStage builder() { public interface PageCountStage { _FinalStage pageCount(int pageCount); - Builder from(DocPagesInsert200ResponseLayout other); + Builder from(ChangeItemPagesReorderLayout other); } public interface _FinalStage { - DocPagesInsert200ResponseLayout build(); + ChangeItemPagesReorderLayout build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - _FinalStage pages(List pages); + _FinalStage pages(List pages); - _FinalStage addPages(DocPagesInsert200ResponseLayoutPagesItem pages); + _FinalStage addPages(ChangeItemPagesReorderLayoutPagesItem pages); - _FinalStage addAllPages(List pages); + _FinalStage addAllPages(List pages); - _FinalStage namedPages(List namedPages); + _FinalStage namedPages(List namedPages); - _FinalStage addNamedPages(DocPagesInsert200ResponseLayoutNamedPagesItem namedPages); + _FinalStage addNamedPages(ChangeItemPagesReorderLayoutNamedPagesItem namedPages); - _FinalStage addAllNamedPages(List namedPages); + _FinalStage addAllNamedPages(List namedPages); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements PageCountStage, _FinalStage { private int pageCount; - private List namedPages = new ArrayList<>(); + private List namedPages = new ArrayList<>(); - private List pages = new ArrayList<>(); + private List pages = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -124,7 +124,7 @@ public static final class Builder implements PageCountStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayout other) { + public Builder from(ChangeItemPagesReorderLayout other) { pageCount(other.getPageCount()); pages(other.getPages()); namedPages(other.getNamedPages()); @@ -139,7 +139,7 @@ public _FinalStage pageCount(int pageCount) { } @java.lang.Override - public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage addAllNamedPages(List namedPages) { if (namedPages != null) { this.namedPages.addAll(namedPages); } @@ -147,14 +147,14 @@ public _FinalStage addAllNamedPages(List namedPages) { + public _FinalStage namedPages(List namedPages) { this.namedPages.clear(); if (namedPages != null) { this.namedPages.addAll(namedPages); @@ -163,7 +163,7 @@ public _FinalStage namedPages(List pages) { + public _FinalStage addAllPages(List pages) { if (pages != null) { this.pages.addAll(pages); } @@ -171,14 +171,14 @@ public _FinalStage addAllPages(List pa } @java.lang.Override - public _FinalStage addPages(DocPagesInsert200ResponseLayoutPagesItem pages) { + public _FinalStage addPages(ChangeItemPagesReorderLayoutPagesItem pages) { this.pages.add(pages); return this; } @java.lang.Override @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { + public _FinalStage pages(List pages) { this.pages.clear(); if (pages != null) { this.pages.addAll(pages); @@ -187,8 +187,8 @@ public _FinalStage pages(List pages) { } @java.lang.Override - public DocPagesInsert200ResponseLayout build() { - return new DocPagesInsert200ResponseLayout(pageCount, pages, namedPages, additionalProperties); + public ChangeItemPagesReorderLayout build() { + return new ChangeItemPagesReorderLayout(pageCount, pages, namedPages, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItem.java new file mode 100644 index 0000000..6958746 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItem.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesReorderLayoutNamedPagesItem { + private final String name; + + private final ChangeItemPagesReorderLayoutNamedPagesItemTarget target; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutNamedPagesItem( + String name, + ChangeItemPagesReorderLayoutNamedPagesItemTarget target, + Map additionalProperties) { + this.name = name; + this.target = target; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("target") + public ChangeItemPagesReorderLayoutNamedPagesItemTarget getTarget() { + return target; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutNamedPagesItem + && equalTo((ChangeItemPagesReorderLayoutNamedPagesItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutNamedPagesItem other) { + return name.equals(other.name) && target.equals(other.target); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.target); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + TargetStage name(@NotNull String name); + + Builder from(ChangeItemPagesReorderLayoutNamedPagesItem other); + } + + public interface TargetStage { + _FinalStage target(@NotNull ChangeItemPagesReorderLayoutNamedPagesItemTarget target); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutNamedPagesItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, TargetStage, _FinalStage { + private String name; + + private ChangeItemPagesReorderLayoutNamedPagesItemTarget target; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutNamedPagesItem other) { + name(other.getName()); + target(other.getTarget()); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TargetStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("target") + public _FinalStage target(@NotNull ChangeItemPagesReorderLayoutNamedPagesItemTarget target) { + this.target = Objects.requireNonNull(target, "target must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutNamedPagesItem build() { + return new ChangeItemPagesReorderLayoutNamedPagesItem(name, target, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.java new file mode 100644 index 0000000..25b4d18 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.java @@ -0,0 +1,286 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class ChangeItemPagesReorderLayoutNamedPagesItemTarget { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private ChangeItemPagesReorderLayoutNamedPagesItemTarget(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static ChangeItemPagesReorderLayoutNamedPagesItemTarget page( + ChangeItemPagesReorderLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesReorderLayoutNamedPagesItemTarget(new PageValue(value)); + } + + public static ChangeItemPagesReorderLayoutNamedPagesItemTarget template( + ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesReorderLayoutNamedPagesItemTarget(new TemplateValue(value)); + } + + public static ChangeItemPagesReorderLayoutNamedPagesItemTarget dangling( + ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesReorderLayoutNamedPagesItemTarget(new DanglingValue(value)); + } + + public boolean isPage() { + return value instanceof PageValue; + } + + public boolean isTemplate() { + return value instanceof TemplateValue; + } + + public boolean isDangling() { + return value instanceof DanglingValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getPage() { + if (isPage()) { + return Optional.of(((PageValue) value).value); + } + return Optional.empty(); + } + + public Optional getTemplate() { + if (isTemplate()) { + return Optional.of(((TemplateValue) value).value); + } + return Optional.empty(); + } + + public Optional getDangling() { + if (isDangling()) { + return Optional.of(((DanglingValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesReorderLayoutNamedPagesItemTarget) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitPage(ChangeItemPagesReorderLayoutNamedPagesItemTargetPage page); + + T visitTemplate(ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate template); + + T visitDangling(ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling dangling); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(PageValue.class), + @JsonSubTypes.Type(TemplateValue.class), + @JsonSubTypes.Type(DanglingValue.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("page") + @JsonIgnoreProperties("kind") + private static final class PageValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesReorderLayoutNamedPagesItemTargetPage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageValue() {} + + private PageValue(ChangeItemPagesReorderLayoutNamedPagesItemTargetPage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPage(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageValue && equalTo((PageValue) other); + } + + private boolean equalTo(PageValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesReorderLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonTypeName("template") + @JsonIgnoreProperties("kind") + private static final class TemplateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private TemplateValue() {} + + private TemplateValue(ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitTemplate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TemplateValue && equalTo((TemplateValue) other); + } + + private boolean equalTo(TemplateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesReorderLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonTypeName("dangling") + @JsonIgnoreProperties("kind") + private static final class DanglingValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private DanglingValue() {} + + private DanglingValue(ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitDangling(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DanglingValue && equalTo((DanglingValue) other); + } + + private boolean equalTo(DanglingValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesReorderLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("kind") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesReorderLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling.java similarity index 71% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling.java index f5b73fc..8e2f873 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling.java @@ -13,18 +13,18 @@ import java.util.Map; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling.Builder.class) -public final class DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling { +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling { private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + private ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling(Map additionalProperties) { this.additionalProperties = additionalProperties; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling; + return other instanceof ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling; } @JsonAnyGetter @@ -48,12 +48,12 @@ public static final class Builder { private Builder() {} - public Builder from(DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling other) { + public Builder from(ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling other) { return this; } - public DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling build() { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling(additionalProperties); + public ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesReorderLayoutNamedPagesItemTargetDangling(additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetPage.java similarity index 75% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetPage.java index b998f8e..6ae56f5 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetPage.java @@ -17,13 +17,13 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage.Builder.class) -public final class DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage { +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesReorderLayoutNamedPagesItemTargetPage { private final PageRef page; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage( + private ChangeItemPagesReorderLayoutNamedPagesItemTargetPage( PageRef page, Map additionalProperties) { this.page = page; this.additionalProperties = additionalProperties; @@ -37,8 +37,8 @@ public PageRef getPage() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage - && equalTo((DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage) other); + return other instanceof ChangeItemPagesReorderLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesReorderLayoutNamedPagesItemTargetPage) other); } @JsonAnyGetter @@ -46,7 +46,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage other) { + private boolean equalTo(ChangeItemPagesReorderLayoutNamedPagesItemTargetPage other) { return page.equals(other.page); } @@ -67,11 +67,11 @@ public static PageStage builder() { public interface PageStage { _FinalStage page(@NotNull PageRef page); - Builder from(DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage other); + Builder from(ChangeItemPagesReorderLayoutNamedPagesItemTargetPage other); } public interface _FinalStage { - DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage build(); + ChangeItemPagesReorderLayoutNamedPagesItemTargetPage build(); _FinalStage additionalProperty(String key, Object value); @@ -88,7 +88,7 @@ public static final class Builder implements PageStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage other) { + public Builder from(ChangeItemPagesReorderLayoutNamedPagesItemTargetPage other) { page(other.getPage()); return this; } @@ -101,8 +101,8 @@ public _FinalStage page(@NotNull PageRef page) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage build() { - return new DocPagesDelete200ResponseLayoutNamedPagesItemTargetPage(page, additionalProperties); + public ChangeItemPagesReorderLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesReorderLayoutNamedPagesItemTargetPage(page, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate.java similarity index 74% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate.java index 8c48fac..aea0694 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate.java @@ -16,13 +16,13 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate.Builder.class) -public final class DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate { +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate { private final int objectNumber; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate( + private ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate( int objectNumber, Map additionalProperties) { this.objectNumber = objectNumber; this.additionalProperties = additionalProperties; @@ -36,8 +36,8 @@ public int getObjectNumber() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate - && equalTo((DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate) other); + return other instanceof ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate) other); } @JsonAnyGetter @@ -45,7 +45,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate other) { + private boolean equalTo(ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate other) { return objectNumber == other.objectNumber; } @@ -66,11 +66,11 @@ public static ObjectNumberStage builder() { public interface ObjectNumberStage { _FinalStage objectNumber(int objectNumber); - Builder from(DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate other); + Builder from(ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate other); } public interface _FinalStage { - DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate build(); + ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate build(); _FinalStage additionalProperty(String key, Object value); @@ -87,7 +87,7 @@ public static final class Builder implements ObjectNumberStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate other) { + public Builder from(ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate other) { objectNumber(other.getObjectNumber()); return this; } @@ -100,8 +100,8 @@ public _FinalStage objectNumber(int objectNumber) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate build() { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + public ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesReorderLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItem.java new file mode 100644 index 0000000..168bebd --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItem.java @@ -0,0 +1,435 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItem.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItem { + private final int index; + + private final PageRef ref; + + private final Optional label; + + private final ChangeItemPagesReorderLayoutPagesItemSize size; + + private final double rotation; + + private final double userUnit; + + private final Optional tabOrder; + + private final ChangeItemPagesReorderLayoutPagesItemBoxes boxes; + + private final ChangeItemPagesReorderLayoutPagesItemPdfCropBox pdfCropBox; + + private final Optional actions; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItem( + int index, + PageRef ref, + Optional label, + ChangeItemPagesReorderLayoutPagesItemSize size, + double rotation, + double userUnit, + Optional tabOrder, + ChangeItemPagesReorderLayoutPagesItemBoxes boxes, + ChangeItemPagesReorderLayoutPagesItemPdfCropBox pdfCropBox, + Optional actions, + Map additionalProperties) { + this.index = index; + this.ref = ref; + this.label = label; + this.size = size; + this.rotation = rotation; + this.userUnit = userUnit; + this.tabOrder = tabOrder; + this.boxes = boxes; + this.pdfCropBox = pdfCropBox; + this.actions = actions; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("index") + public int getIndex() { + return index; + } + + @JsonProperty("ref") + public PageRef getRef() { + return ref; + } + + @JsonIgnore + public Optional getLabel() { + if (label == null) { + return Optional.empty(); + } + return label; + } + + @JsonProperty("size") + public ChangeItemPagesReorderLayoutPagesItemSize getSize() { + return size; + } + + @JsonProperty("rotation") + public double getRotation() { + return rotation; + } + + @JsonProperty("userUnit") + public double getUserUnit() { + return userUnit; + } + + @JsonIgnore + public Optional getTabOrder() { + if (tabOrder == null) { + return Optional.empty(); + } + return tabOrder; + } + + @JsonProperty("boxes") + public ChangeItemPagesReorderLayoutPagesItemBoxes getBoxes() { + return boxes; + } + + @JsonProperty("pdfCropBox") + public ChangeItemPagesReorderLayoutPagesItemPdfCropBox getPdfCropBox() { + return pdfCropBox; + } + + @JsonProperty("actions") + public Optional getActions() { + return actions; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("label") + private Optional _getLabel() { + return label; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("tabOrder") + private Optional _getTabOrder() { + return tabOrder; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItem + && equalTo((ChangeItemPagesReorderLayoutPagesItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItem other) { + return index == other.index + && ref.equals(other.ref) + && label.equals(other.label) + && size.equals(other.size) + && rotation == other.rotation + && userUnit == other.userUnit + && tabOrder.equals(other.tabOrder) + && boxes.equals(other.boxes) + && pdfCropBox.equals(other.pdfCropBox) + && actions.equals(other.actions); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.index, + this.ref, + this.label, + this.size, + this.rotation, + this.userUnit, + this.tabOrder, + this.boxes, + this.pdfCropBox, + this.actions); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IndexStage builder() { + return new Builder(); + } + + public interface IndexStage { + RefStage index(int index); + + Builder from(ChangeItemPagesReorderLayoutPagesItem other); + } + + public interface RefStage { + SizeStage ref(@NotNull PageRef ref); + } + + public interface SizeStage { + RotationStage size(@NotNull ChangeItemPagesReorderLayoutPagesItemSize size); + } + + public interface RotationStage { + UserUnitStage rotation(double rotation); + } + + public interface UserUnitStage { + BoxesStage userUnit(double userUnit); + } + + public interface BoxesStage { + PdfCropBoxStage boxes(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxes boxes); + } + + public interface PdfCropBoxStage { + _FinalStage pdfCropBox(@NotNull ChangeItemPagesReorderLayoutPagesItemPdfCropBox pdfCropBox); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage label(Optional label); + + _FinalStage label(String label); + + _FinalStage label(Nullable label); + + _FinalStage tabOrder(Optional tabOrder); + + _FinalStage tabOrder(ChangeItemPagesReorderLayoutPagesItemTabOrder tabOrder); + + _FinalStage tabOrder(Nullable tabOrder); + + _FinalStage actions(Optional actions); + + _FinalStage actions(PdfPageActions actions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IndexStage, + RefStage, + SizeStage, + RotationStage, + UserUnitStage, + BoxesStage, + PdfCropBoxStage, + _FinalStage { + private int index; + + private PageRef ref; + + private ChangeItemPagesReorderLayoutPagesItemSize size; + + private double rotation; + + private double userUnit; + + private ChangeItemPagesReorderLayoutPagesItemBoxes boxes; + + private ChangeItemPagesReorderLayoutPagesItemPdfCropBox pdfCropBox; + + private Optional actions = Optional.empty(); + + private Optional tabOrder = Optional.empty(); + + private Optional label = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItem other) { + index(other.getIndex()); + ref(other.getRef()); + label(other.getLabel()); + size(other.getSize()); + rotation(other.getRotation()); + userUnit(other.getUserUnit()); + tabOrder(other.getTabOrder()); + boxes(other.getBoxes()); + pdfCropBox(other.getPdfCropBox()); + actions(other.getActions()); + return this; + } + + @java.lang.Override + @JsonSetter("index") + public RefStage index(int index) { + this.index = index; + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public SizeStage ref(@NotNull PageRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("size") + public RotationStage size(@NotNull ChangeItemPagesReorderLayoutPagesItemSize size) { + this.size = Objects.requireNonNull(size, "size must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("rotation") + public UserUnitStage rotation(double rotation) { + this.rotation = rotation; + return this; + } + + @java.lang.Override + @JsonSetter("userUnit") + public BoxesStage userUnit(double userUnit) { + this.userUnit = userUnit; + return this; + } + + @java.lang.Override + @JsonSetter("boxes") + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxes boxes) { + this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("pdfCropBox") + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesReorderLayoutPagesItemPdfCropBox pdfCropBox) { + this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage actions(PdfPageActions actions) { + this.actions = Optional.ofNullable(actions); + return this; + } + + @java.lang.Override + @JsonSetter(value = "actions", nulls = Nulls.SKIP) + public _FinalStage actions(Optional actions) { + this.actions = actions; + return this; + } + + @java.lang.Override + public _FinalStage tabOrder(Nullable tabOrder) { + if (tabOrder.isNull()) { + this.tabOrder = null; + } else if (tabOrder.isEmpty()) { + this.tabOrder = Optional.empty(); + } else { + this.tabOrder = Optional.of(tabOrder.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage tabOrder(ChangeItemPagesReorderLayoutPagesItemTabOrder tabOrder) { + this.tabOrder = Optional.ofNullable(tabOrder); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tabOrder", nulls = Nulls.SKIP) + public _FinalStage tabOrder(Optional tabOrder) { + this.tabOrder = tabOrder; + return this; + } + + @java.lang.Override + public _FinalStage label(Nullable label) { + if (label.isNull()) { + this.label = null; + } else if (label.isEmpty()) { + this.label = Optional.empty(); + } else { + this.label = Optional.of(label.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage label(String label) { + this.label = Optional.ofNullable(label); + return this; + } + + @java.lang.Override + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public _FinalStage label(Optional label) { + this.label = label; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItem build() { + return new ChangeItemPagesReorderLayoutPagesItem( + index, + ref, + label, + size, + rotation, + userUnit, + tabOrder, + boxes, + pdfCropBox, + actions, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxes.java similarity index 57% rename from src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxes.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxes.java index acc4053..61cf231 100644 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxes.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxes.java @@ -17,26 +17,26 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxes.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxes { - private final DocPagesInsert200ResponseLayoutPagesItemBoxesMedia media; +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxes { + private final ChangeItemPagesReorderLayoutPagesItemBoxesMedia media; - private final DocPagesInsert200ResponseLayoutPagesItemBoxesCrop crop; + private final ChangeItemPagesReorderLayoutPagesItemBoxesCrop crop; - private final DocPagesInsert200ResponseLayoutPagesItemBoxesBleed bleed; + private final ChangeItemPagesReorderLayoutPagesItemBoxesBleed bleed; - private final DocPagesInsert200ResponseLayoutPagesItemBoxesTrim trim; + private final ChangeItemPagesReorderLayoutPagesItemBoxesTrim trim; - private final DocPagesInsert200ResponseLayoutPagesItemBoxesArt art; + private final ChangeItemPagesReorderLayoutPagesItemBoxesArt art; private final Map additionalProperties; - private DocPagesInsert200ResponseLayoutPagesItemBoxes( - DocPagesInsert200ResponseLayoutPagesItemBoxesMedia media, - DocPagesInsert200ResponseLayoutPagesItemBoxesCrop crop, - DocPagesInsert200ResponseLayoutPagesItemBoxesBleed bleed, - DocPagesInsert200ResponseLayoutPagesItemBoxesTrim trim, - DocPagesInsert200ResponseLayoutPagesItemBoxesArt art, + private ChangeItemPagesReorderLayoutPagesItemBoxes( + ChangeItemPagesReorderLayoutPagesItemBoxesMedia media, + ChangeItemPagesReorderLayoutPagesItemBoxesCrop crop, + ChangeItemPagesReorderLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesReorderLayoutPagesItemBoxesTrim trim, + ChangeItemPagesReorderLayoutPagesItemBoxesArt art, Map additionalProperties) { this.media = media; this.crop = crop; @@ -47,35 +47,35 @@ private DocPagesInsert200ResponseLayoutPagesItemBoxes( } @JsonProperty("media") - public DocPagesInsert200ResponseLayoutPagesItemBoxesMedia getMedia() { + public ChangeItemPagesReorderLayoutPagesItemBoxesMedia getMedia() { return media; } @JsonProperty("crop") - public DocPagesInsert200ResponseLayoutPagesItemBoxesCrop getCrop() { + public ChangeItemPagesReorderLayoutPagesItemBoxesCrop getCrop() { return crop; } @JsonProperty("bleed") - public DocPagesInsert200ResponseLayoutPagesItemBoxesBleed getBleed() { + public ChangeItemPagesReorderLayoutPagesItemBoxesBleed getBleed() { return bleed; } @JsonProperty("trim") - public DocPagesInsert200ResponseLayoutPagesItemBoxesTrim getTrim() { + public ChangeItemPagesReorderLayoutPagesItemBoxesTrim getTrim() { return trim; } @JsonProperty("art") - public DocPagesInsert200ResponseLayoutPagesItemBoxesArt getArt() { + public ChangeItemPagesReorderLayoutPagesItemBoxesArt getArt() { return art; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxes - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxes) other); + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxes + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxes) other); } @JsonAnyGetter @@ -83,7 +83,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxes other) { + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxes other) { return media.equals(other.media) && crop.equals(other.crop) && bleed.equals(other.bleed) @@ -106,29 +106,29 @@ public static MediaStage builder() { } public interface MediaStage { - CropStage media(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesMedia media); + CropStage media(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesMedia media); - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxes other); + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxes other); } public interface CropStage { - BleedStage crop(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesCrop crop); + BleedStage crop(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesCrop crop); } public interface BleedStage { - TrimStage bleed(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesBleed bleed); + TrimStage bleed(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesBleed bleed); } public interface TrimStage { - ArtStage trim(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesTrim trim); + ArtStage trim(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesTrim trim); } public interface ArtStage { - _FinalStage art(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesArt art); + _FinalStage art(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesArt art); } public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxes build(); + ChangeItemPagesReorderLayoutPagesItemBoxes build(); _FinalStage additionalProperty(String key, Object value); @@ -137,15 +137,15 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { - private DocPagesInsert200ResponseLayoutPagesItemBoxesMedia media; + private ChangeItemPagesReorderLayoutPagesItemBoxesMedia media; - private DocPagesInsert200ResponseLayoutPagesItemBoxesCrop crop; + private ChangeItemPagesReorderLayoutPagesItemBoxesCrop crop; - private DocPagesInsert200ResponseLayoutPagesItemBoxesBleed bleed; + private ChangeItemPagesReorderLayoutPagesItemBoxesBleed bleed; - private DocPagesInsert200ResponseLayoutPagesItemBoxesTrim trim; + private ChangeItemPagesReorderLayoutPagesItemBoxesTrim trim; - private DocPagesInsert200ResponseLayoutPagesItemBoxesArt art; + private ChangeItemPagesReorderLayoutPagesItemBoxesArt art; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -153,7 +153,7 @@ public static final class Builder implements MediaStage, CropStage, BleedStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxes other) { + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxes other) { media(other.getMedia()); crop(other.getCrop()); bleed(other.getBleed()); @@ -164,43 +164,42 @@ public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxes other) { @java.lang.Override @JsonSetter("media") - public CropStage media(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesMedia media) { + public CropStage media(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesMedia media) { this.media = Objects.requireNonNull(media, "media must not be null"); return this; } @java.lang.Override @JsonSetter("crop") - public BleedStage crop(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesCrop crop) { + public BleedStage crop(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesCrop crop) { this.crop = Objects.requireNonNull(crop, "crop must not be null"); return this; } @java.lang.Override @JsonSetter("bleed") - public TrimStage bleed(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesBleed bleed) { + public TrimStage bleed(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesBleed bleed) { this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); return this; } @java.lang.Override @JsonSetter("trim") - public ArtStage trim(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesTrim trim) { + public ArtStage trim(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesTrim trim) { this.trim = Objects.requireNonNull(trim, "trim must not be null"); return this; } @java.lang.Override @JsonSetter("art") - public _FinalStage art(@NotNull DocPagesInsert200ResponseLayoutPagesItemBoxesArt art) { + public _FinalStage art(@NotNull ChangeItemPagesReorderLayoutPagesItemBoxesArt art) { this.art = Objects.requireNonNull(art, "art must not be null"); return this; } @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxes build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxes( - media, crop, bleed, trim, art, additionalProperties); + public ChangeItemPagesReorderLayoutPagesItemBoxes build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxes(media, crop, bleed, trim, art, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesArt.java new file mode 100644 index 0000000..cfdbf6b --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesArt.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxesArt { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemBoxesArt( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxesArt) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxesArt other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesArt other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemBoxesArt build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesArt other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesBleed.java new file mode 100644 index 0000000..61b1bde --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesBleed.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxesBleed { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemBoxesBleed( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxesBleed) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxesBleed other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesBleed other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemBoxesBleed build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesBleed other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesCrop.java new file mode 100644 index 0000000..a3db22c --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesCrop.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxesCrop { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemBoxesCrop( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxesCrop) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxesCrop other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesCrop other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemBoxesCrop build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesCrop other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesMedia.java new file mode 100644 index 0000000..85e6aee --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesMedia.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxesMedia { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemBoxesMedia( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxesMedia) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxesMedia other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesMedia other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemBoxesMedia build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesMedia other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesTrim.java new file mode 100644 index 0000000..7c6cbfd --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemBoxesTrim.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemBoxesTrim { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemBoxesTrim( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesReorderLayoutPagesItemBoxesTrim) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemBoxesTrim other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesTrim other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemBoxesTrim build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemBoxesTrim other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesReorderLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemPdfCropBox.java similarity index 82% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemPdfCropBox.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemPdfCropBox.java index 0d7f111..61f1e0b 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemPdfCropBox.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemPdfCropBox.java @@ -16,8 +16,8 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemPdfCropBox.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemPdfCropBox { +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemPdfCropBox { private final double left; private final double bottom; @@ -28,7 +28,7 @@ public final class DocPagesRotate200ResponseLayoutPagesItemPdfCropBox { private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutPagesItemPdfCropBox( + private ChangeItemPagesReorderLayoutPagesItemPdfCropBox( double left, double bottom, double right, double top, Map additionalProperties) { this.left = left; this.bottom = bottom; @@ -60,8 +60,8 @@ public double getTop() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemPdfCropBox - && equalTo((DocPagesRotate200ResponseLayoutPagesItemPdfCropBox) other); + return other instanceof ChangeItemPagesReorderLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesReorderLayoutPagesItemPdfCropBox) other); } @JsonAnyGetter @@ -69,7 +69,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemPdfCropBox other) { + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemPdfCropBox other) { return left == other.left && bottom == other.bottom && right == other.right && top == other.top; } @@ -90,7 +90,7 @@ public static LeftStage builder() { public interface LeftStage { BottomStage left(double left); - Builder from(DocPagesRotate200ResponseLayoutPagesItemPdfCropBox other); + Builder from(ChangeItemPagesReorderLayoutPagesItemPdfCropBox other); } public interface BottomStage { @@ -106,7 +106,7 @@ public interface TopStage { } public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemPdfCropBox build(); + ChangeItemPagesReorderLayoutPagesItemPdfCropBox build(); _FinalStage additionalProperty(String key, Object value); @@ -129,7 +129,7 @@ public static final class Builder implements LeftStage, BottomStage, RightStage, private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemPdfCropBox other) { + public Builder from(ChangeItemPagesReorderLayoutPagesItemPdfCropBox other) { left(other.getLeft()); bottom(other.getBottom()); right(other.getRight()); @@ -166,9 +166,8 @@ public _FinalStage top(double top) { } @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemPdfCropBox build() { - return new DocPagesRotate200ResponseLayoutPagesItemPdfCropBox( - left, bottom, right, top, additionalProperties); + public ChangeItemPagesReorderLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesReorderLayoutPagesItemPdfCropBox(left, bottom, right, top, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemSize.java new file mode 100644 index 0000000..a993396 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemSize.java @@ -0,0 +1,141 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesReorderLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesReorderLayoutPagesItemSize { + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesReorderLayoutPagesItemSize( + double width, double height, Map additionalProperties) { + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesReorderLayoutPagesItemSize + && equalTo((ChangeItemPagesReorderLayoutPagesItemSize) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesReorderLayoutPagesItemSize other) { + return width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static WidthStage builder() { + return new Builder(); + } + + public interface WidthStage { + HeightStage width(double width); + + Builder from(ChangeItemPagesReorderLayoutPagesItemSize other); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesReorderLayoutPagesItemSize build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements WidthStage, HeightStage, _FinalStage { + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesReorderLayoutPagesItemSize other) { + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesReorderLayoutPagesItemSize build() { + return new ChangeItemPagesReorderLayoutPagesItemSize(width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemTabOrder.java similarity index 59% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemTabOrder.java rename to src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemTabOrder.java index 974c769..9a51485 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemTabOrder.java +++ b/src/main/java/api/types/ChangeItemPagesReorderLayoutPagesItemTabOrder.java @@ -6,27 +6,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class DocPagesRotate200ResponseLayoutPagesItemTabOrder { - public static final DocPagesRotate200ResponseLayoutPagesItemTabOrder WIDGETS = - new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); +public final class ChangeItemPagesReorderLayoutPagesItemTabOrder { + public static final ChangeItemPagesReorderLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); - public static final DocPagesRotate200ResponseLayoutPagesItemTabOrder COLUMNS = - new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + public static final ChangeItemPagesReorderLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); - public static final DocPagesRotate200ResponseLayoutPagesItemTabOrder ANNOTATIONS = - new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + public static final ChangeItemPagesReorderLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); - public static final DocPagesRotate200ResponseLayoutPagesItemTabOrder ROWS = - new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.ROWS, "rows"); + public static final ChangeItemPagesReorderLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.ROWS, "rows"); - public static final DocPagesRotate200ResponseLayoutPagesItemTabOrder STRUCTURE = - new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + public static final ChangeItemPagesReorderLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); private final Value value; private final String string; - DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value value, String string) { + ChangeItemPagesReorderLayoutPagesItemTabOrder(Value value, String string) { this.value = value; this.string = string; } @@ -44,8 +44,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof DocPagesRotate200ResponseLayoutPagesItemTabOrder - && this.string.equals(((DocPagesRotate200ResponseLayoutPagesItemTabOrder) other).string)); + || (other instanceof ChangeItemPagesReorderLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesReorderLayoutPagesItemTabOrder) other).string)); } @java.lang.Override @@ -72,7 +72,7 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DocPagesRotate200ResponseLayoutPagesItemTabOrder valueOf(String value) { + public static ChangeItemPagesReorderLayoutPagesItemTabOrder valueOf(String value) { switch (value) { case "widgets": return WIDGETS; @@ -85,7 +85,7 @@ public static DocPagesRotate200ResponseLayoutPagesItemTabOrder valueOf(String va case "structure": return STRUCTURE; default: - return new DocPagesRotate200ResponseLayoutPagesItemTabOrder(Value.UNKNOWN, value); + return new ChangeItemPagesReorderLayoutPagesItemTabOrder(Value.UNKNOWN, value); } } diff --git a/src/main/java/api/types/ChangeItemPagesRestore.java b/src/main/java/api/types/ChangeItemPagesRestore.java new file mode 100644 index 0000000..d106e83 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestore.java @@ -0,0 +1,188 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestore.Builder.class) +public final class ChangeItemPagesRestore { + private final List pages; + + private final ChangeItemPagesRestoreLayout layout; + + private final MutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemPagesRestore( + List pages, + ChangeItemPagesRestoreLayout layout, + MutationMeta meta, + Map additionalProperties) { + this.pages = pages; + this.layout = layout; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("layout") + public ChangeItemPagesRestoreLayout getLayout() { + return layout; + } + + @JsonProperty("meta") + public MutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestore && equalTo((ChangeItemPagesRestore) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestore other) { + return pages.equals(other.pages) && layout.equals(other.layout) && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages, this.layout, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LayoutStage builder() { + return new Builder(); + } + + public interface LayoutStage { + MetaStage layout(@NotNull ChangeItemPagesRestoreLayout layout); + + Builder from(ChangeItemPagesRestore other); + } + + public interface MetaStage { + _FinalStage meta(@NotNull MutationMeta meta); + } + + public interface _FinalStage { + ChangeItemPagesRestore build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(PageRef pages); + + _FinalStage addAllPages(List pages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LayoutStage, MetaStage, _FinalStage { + private ChangeItemPagesRestoreLayout layout; + + private MutationMeta meta; + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestore other) { + pages(other.getPages()); + layout(other.getLayout()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("layout") + public MetaStage layout(@NotNull ChangeItemPagesRestoreLayout layout) { + this.layout = Objects.requireNonNull(layout, "layout must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull MutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeItemPagesRestore build() { + return new ChangeItemPagesRestore(pages, layout, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayout.java b/src/main/java/api/types/ChangeItemPagesRestoreLayout.java new file mode 100644 index 0000000..48b42de --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayout.java @@ -0,0 +1,206 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayout.Builder.class) +public final class ChangeItemPagesRestoreLayout { + private final int pageCount; + + private final List pages; + + private final List namedPages; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayout( + int pageCount, + List pages, + List namedPages, + Map additionalProperties) { + this.pageCount = pageCount; + this.pages = pages; + this.namedPages = namedPages; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pageCount") + public int getPageCount() { + return pageCount; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("namedPages") + public List getNamedPages() { + return namedPages; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayout && equalTo((ChangeItemPagesRestoreLayout) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayout other) { + return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pageCount, this.pages, this.namedPages); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PageCountStage builder() { + return new Builder(); + } + + public interface PageCountStage { + _FinalStage pageCount(int pageCount); + + Builder from(ChangeItemPagesRestoreLayout other); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayout build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(ChangeItemPagesRestoreLayoutPagesItem pages); + + _FinalStage addAllPages(List pages); + + _FinalStage namedPages(List namedPages); + + _FinalStage addNamedPages(ChangeItemPagesRestoreLayoutNamedPagesItem namedPages); + + _FinalStage addAllNamedPages(List namedPages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PageCountStage, _FinalStage { + private int pageCount; + + private List namedPages = new ArrayList<>(); + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayout other) { + pageCount(other.getPageCount()); + pages(other.getPages()); + namedPages(other.getNamedPages()); + return this; + } + + @java.lang.Override + @JsonSetter("pageCount") + public _FinalStage pageCount(int pageCount) { + this.pageCount = pageCount; + return this; + } + + @java.lang.Override + public _FinalStage addAllNamedPages(List namedPages) { + if (namedPages != null) { + this.namedPages.addAll(namedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addNamedPages(ChangeItemPagesRestoreLayoutNamedPagesItem namedPages) { + this.namedPages.add(namedPages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "namedPages", nulls = Nulls.SKIP) + public _FinalStage namedPages(List namedPages) { + this.namedPages.clear(); + if (namedPages != null) { + this.namedPages.addAll(namedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(ChangeItemPagesRestoreLayoutPagesItem pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayout build() { + return new ChangeItemPagesRestoreLayout(pageCount, pages, namedPages, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItem.java new file mode 100644 index 0000000..9665c49 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItem.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesRestoreLayoutNamedPagesItem { + private final String name; + + private final ChangeItemPagesRestoreLayoutNamedPagesItemTarget target; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutNamedPagesItem( + String name, + ChangeItemPagesRestoreLayoutNamedPagesItemTarget target, + Map additionalProperties) { + this.name = name; + this.target = target; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("target") + public ChangeItemPagesRestoreLayoutNamedPagesItemTarget getTarget() { + return target; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutNamedPagesItem + && equalTo((ChangeItemPagesRestoreLayoutNamedPagesItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutNamedPagesItem other) { + return name.equals(other.name) && target.equals(other.target); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.target); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + TargetStage name(@NotNull String name); + + Builder from(ChangeItemPagesRestoreLayoutNamedPagesItem other); + } + + public interface TargetStage { + _FinalStage target(@NotNull ChangeItemPagesRestoreLayoutNamedPagesItemTarget target); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutNamedPagesItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, TargetStage, _FinalStage { + private String name; + + private ChangeItemPagesRestoreLayoutNamedPagesItemTarget target; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutNamedPagesItem other) { + name(other.getName()); + target(other.getTarget()); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TargetStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("target") + public _FinalStage target(@NotNull ChangeItemPagesRestoreLayoutNamedPagesItemTarget target) { + this.target = Objects.requireNonNull(target, "target must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutNamedPagesItem build() { + return new ChangeItemPagesRestoreLayoutNamedPagesItem(name, target, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTarget.java similarity index 72% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTarget.java rename to src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTarget.java index b8b2238..a9c9869 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTarget.java +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTarget.java @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class DocPagesRotate200ResponseLayoutNamedPagesItemTarget { +public final class ChangeItemPagesRestoreLayoutNamedPagesItemTarget { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private DocPagesRotate200ResponseLayoutNamedPagesItemTarget(Value value) { + private ChangeItemPagesRestoreLayoutNamedPagesItemTarget(Value value) { this.value = value; } @@ -26,19 +26,19 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static DocPagesRotate200ResponseLayoutNamedPagesItemTarget page( - DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage value) { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTarget(new PageValue(value)); + public static ChangeItemPagesRestoreLayoutNamedPagesItemTarget page( + ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTarget(new PageValue(value)); } - public static DocPagesRotate200ResponseLayoutNamedPagesItemTarget template( - DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate value) { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTarget(new TemplateValue(value)); + public static ChangeItemPagesRestoreLayoutNamedPagesItemTarget template( + ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTarget(new TemplateValue(value)); } - public static DocPagesRotate200ResponseLayoutNamedPagesItemTarget dangling( - DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling value) { - return new DocPagesRotate200ResponseLayoutNamedPagesItemTarget(new DanglingValue(value)); + public static ChangeItemPagesRestoreLayoutNamedPagesItemTarget dangling( + ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTarget(new DanglingValue(value)); } public boolean isPage() { @@ -57,21 +57,21 @@ public boolean _isUnknown() { return value instanceof _UnknownValue; } - public Optional getPage() { + public Optional getPage() { if (isPage()) { return Optional.of(((PageValue) value).value); } return Optional.empty(); } - public Optional getTemplate() { + public Optional getTemplate() { if (isTemplate()) { return Optional.of(((TemplateValue) value).value); } return Optional.empty(); } - public Optional getDangling() { + public Optional getDangling() { if (isDangling()) { return Optional.of(((DanglingValue) value).value); } @@ -88,8 +88,8 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutNamedPagesItemTarget - && value.equals(((DocPagesRotate200ResponseLayoutNamedPagesItemTarget) other).value); + return other instanceof ChangeItemPagesRestoreLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesRestoreLayoutNamedPagesItemTarget) other).value); } @Override @@ -108,11 +108,11 @@ private Value getValue() { } public interface Visitor { - T visitPage(DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage page); + T visitPage(ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage page); - T visitTemplate(DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate template); + T visitTemplate(ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate template); - T visitDangling(DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling dangling); + T visitDangling(ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling dangling); T _visitUnknown(Object unknownType); } @@ -133,12 +133,12 @@ private interface Value { private static final class PageValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage value; + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private PageValue() {} - private PageValue(DocPagesRotate200ResponseLayoutNamedPagesItemTargetPage value) { + private PageValue(ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage value) { this.value = value; } @@ -164,7 +164,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesRotate200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesRestoreLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -173,12 +173,12 @@ public String toString() { private static final class TemplateValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate value; + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private TemplateValue() {} - private TemplateValue(DocPagesRotate200ResponseLayoutNamedPagesItemTargetTemplate value) { + private TemplateValue(ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate value) { this.value = value; } @@ -204,7 +204,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesRotate200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesRestoreLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -213,12 +213,12 @@ public String toString() { private static final class DanglingValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling value; + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private DanglingValue() {} - private DanglingValue(DocPagesRotate200ResponseLayoutNamedPagesItemTargetDangling value) { + private DanglingValue(ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling value) { this.value = value; } @@ -244,7 +244,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesRotate200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + return "ChangeItemPagesRestoreLayoutNamedPagesItemTarget{" + "value: " + value + "}"; } } @@ -280,7 +280,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "DocPagesRotate200ResponseLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; + return "ChangeItemPagesRestoreLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; } } } diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling.java new file mode 100644 index 0000000..eb9510c --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling.java @@ -0,0 +1,69 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling { + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling other) { + return this; + } + + public ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTargetDangling(additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage.java new file mode 100644 index 0000000..4b4d9a3 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage.java @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage { + private final PageRef page; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage( + PageRef page, Map additionalProperties) { + this.page = page; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("page") + public PageRef getPage() { + return page; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage other) { + return page.equals(other.page); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.page); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PageStage builder() { + return new Builder(); + } + + public interface PageStage { + _FinalStage page(@NotNull PageRef page); + + Builder from(ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage other); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PageStage, _FinalStage { + private PageRef page; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage other) { + page(other.getPage()); + return this; + } + + @java.lang.Override + @JsonSetter("page") + public _FinalStage page(@NotNull PageRef page) { + this.page = Objects.requireNonNull(page, "page must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTargetPage(page, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate.java new file mode 100644 index 0000000..a95ba56 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate { + private final int objectNumber; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate( + int objectNumber, Map additionalProperties) { + this.objectNumber = objectNumber; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("objectNumber") + public int getObjectNumber() { + return objectNumber; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate other) { + return objectNumber == other.objectNumber; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.objectNumber); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectNumberStage builder() { + return new Builder(); + } + + public interface ObjectNumberStage { + _FinalStage objectNumber(int objectNumber); + + Builder from(ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate other); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectNumberStage, _FinalStage { + private int objectNumber; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate other) { + objectNumber(other.getObjectNumber()); + return this; + } + + @java.lang.Override + @JsonSetter("objectNumber") + public _FinalStage objectNumber(int objectNumber) { + this.objectNumber = objectNumber; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesRestoreLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItem.java new file mode 100644 index 0000000..ea08bd0 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItem.java @@ -0,0 +1,435 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItem.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItem { + private final int index; + + private final PageRef ref; + + private final Optional label; + + private final ChangeItemPagesRestoreLayoutPagesItemSize size; + + private final double rotation; + + private final double userUnit; + + private final Optional tabOrder; + + private final ChangeItemPagesRestoreLayoutPagesItemBoxes boxes; + + private final ChangeItemPagesRestoreLayoutPagesItemPdfCropBox pdfCropBox; + + private final Optional actions; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItem( + int index, + PageRef ref, + Optional label, + ChangeItemPagesRestoreLayoutPagesItemSize size, + double rotation, + double userUnit, + Optional tabOrder, + ChangeItemPagesRestoreLayoutPagesItemBoxes boxes, + ChangeItemPagesRestoreLayoutPagesItemPdfCropBox pdfCropBox, + Optional actions, + Map additionalProperties) { + this.index = index; + this.ref = ref; + this.label = label; + this.size = size; + this.rotation = rotation; + this.userUnit = userUnit; + this.tabOrder = tabOrder; + this.boxes = boxes; + this.pdfCropBox = pdfCropBox; + this.actions = actions; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("index") + public int getIndex() { + return index; + } + + @JsonProperty("ref") + public PageRef getRef() { + return ref; + } + + @JsonIgnore + public Optional getLabel() { + if (label == null) { + return Optional.empty(); + } + return label; + } + + @JsonProperty("size") + public ChangeItemPagesRestoreLayoutPagesItemSize getSize() { + return size; + } + + @JsonProperty("rotation") + public double getRotation() { + return rotation; + } + + @JsonProperty("userUnit") + public double getUserUnit() { + return userUnit; + } + + @JsonIgnore + public Optional getTabOrder() { + if (tabOrder == null) { + return Optional.empty(); + } + return tabOrder; + } + + @JsonProperty("boxes") + public ChangeItemPagesRestoreLayoutPagesItemBoxes getBoxes() { + return boxes; + } + + @JsonProperty("pdfCropBox") + public ChangeItemPagesRestoreLayoutPagesItemPdfCropBox getPdfCropBox() { + return pdfCropBox; + } + + @JsonProperty("actions") + public Optional getActions() { + return actions; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("label") + private Optional _getLabel() { + return label; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("tabOrder") + private Optional _getTabOrder() { + return tabOrder; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItem + && equalTo((ChangeItemPagesRestoreLayoutPagesItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItem other) { + return index == other.index + && ref.equals(other.ref) + && label.equals(other.label) + && size.equals(other.size) + && rotation == other.rotation + && userUnit == other.userUnit + && tabOrder.equals(other.tabOrder) + && boxes.equals(other.boxes) + && pdfCropBox.equals(other.pdfCropBox) + && actions.equals(other.actions); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.index, + this.ref, + this.label, + this.size, + this.rotation, + this.userUnit, + this.tabOrder, + this.boxes, + this.pdfCropBox, + this.actions); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IndexStage builder() { + return new Builder(); + } + + public interface IndexStage { + RefStage index(int index); + + Builder from(ChangeItemPagesRestoreLayoutPagesItem other); + } + + public interface RefStage { + SizeStage ref(@NotNull PageRef ref); + } + + public interface SizeStage { + RotationStage size(@NotNull ChangeItemPagesRestoreLayoutPagesItemSize size); + } + + public interface RotationStage { + UserUnitStage rotation(double rotation); + } + + public interface UserUnitStage { + BoxesStage userUnit(double userUnit); + } + + public interface BoxesStage { + PdfCropBoxStage boxes(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxes boxes); + } + + public interface PdfCropBoxStage { + _FinalStage pdfCropBox(@NotNull ChangeItemPagesRestoreLayoutPagesItemPdfCropBox pdfCropBox); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage label(Optional label); + + _FinalStage label(String label); + + _FinalStage label(Nullable label); + + _FinalStage tabOrder(Optional tabOrder); + + _FinalStage tabOrder(ChangeItemPagesRestoreLayoutPagesItemTabOrder tabOrder); + + _FinalStage tabOrder(Nullable tabOrder); + + _FinalStage actions(Optional actions); + + _FinalStage actions(PdfPageActions actions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IndexStage, + RefStage, + SizeStage, + RotationStage, + UserUnitStage, + BoxesStage, + PdfCropBoxStage, + _FinalStage { + private int index; + + private PageRef ref; + + private ChangeItemPagesRestoreLayoutPagesItemSize size; + + private double rotation; + + private double userUnit; + + private ChangeItemPagesRestoreLayoutPagesItemBoxes boxes; + + private ChangeItemPagesRestoreLayoutPagesItemPdfCropBox pdfCropBox; + + private Optional actions = Optional.empty(); + + private Optional tabOrder = Optional.empty(); + + private Optional label = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItem other) { + index(other.getIndex()); + ref(other.getRef()); + label(other.getLabel()); + size(other.getSize()); + rotation(other.getRotation()); + userUnit(other.getUserUnit()); + tabOrder(other.getTabOrder()); + boxes(other.getBoxes()); + pdfCropBox(other.getPdfCropBox()); + actions(other.getActions()); + return this; + } + + @java.lang.Override + @JsonSetter("index") + public RefStage index(int index) { + this.index = index; + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public SizeStage ref(@NotNull PageRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("size") + public RotationStage size(@NotNull ChangeItemPagesRestoreLayoutPagesItemSize size) { + this.size = Objects.requireNonNull(size, "size must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("rotation") + public UserUnitStage rotation(double rotation) { + this.rotation = rotation; + return this; + } + + @java.lang.Override + @JsonSetter("userUnit") + public BoxesStage userUnit(double userUnit) { + this.userUnit = userUnit; + return this; + } + + @java.lang.Override + @JsonSetter("boxes") + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxes boxes) { + this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("pdfCropBox") + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesRestoreLayoutPagesItemPdfCropBox pdfCropBox) { + this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage actions(PdfPageActions actions) { + this.actions = Optional.ofNullable(actions); + return this; + } + + @java.lang.Override + @JsonSetter(value = "actions", nulls = Nulls.SKIP) + public _FinalStage actions(Optional actions) { + this.actions = actions; + return this; + } + + @java.lang.Override + public _FinalStage tabOrder(Nullable tabOrder) { + if (tabOrder.isNull()) { + this.tabOrder = null; + } else if (tabOrder.isEmpty()) { + this.tabOrder = Optional.empty(); + } else { + this.tabOrder = Optional.of(tabOrder.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage tabOrder(ChangeItemPagesRestoreLayoutPagesItemTabOrder tabOrder) { + this.tabOrder = Optional.ofNullable(tabOrder); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tabOrder", nulls = Nulls.SKIP) + public _FinalStage tabOrder(Optional tabOrder) { + this.tabOrder = tabOrder; + return this; + } + + @java.lang.Override + public _FinalStage label(Nullable label) { + if (label.isNull()) { + this.label = null; + } else if (label.isEmpty()) { + this.label = Optional.empty(); + } else { + this.label = Optional.of(label.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage label(String label) { + this.label = Optional.ofNullable(label); + return this; + } + + @java.lang.Override + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public _FinalStage label(Optional label) { + this.label = label; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItem build() { + return new ChangeItemPagesRestoreLayoutPagesItem( + index, + ref, + label, + size, + rotation, + userUnit, + tabOrder, + boxes, + pdfCropBox, + actions, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxes.java new file mode 100644 index 0000000..1a1dd47 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxes.java @@ -0,0 +1,217 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxes { + private final ChangeItemPagesRestoreLayoutPagesItemBoxesMedia media; + + private final ChangeItemPagesRestoreLayoutPagesItemBoxesCrop crop; + + private final ChangeItemPagesRestoreLayoutPagesItemBoxesBleed bleed; + + private final ChangeItemPagesRestoreLayoutPagesItemBoxesTrim trim; + + private final ChangeItemPagesRestoreLayoutPagesItemBoxesArt art; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxes( + ChangeItemPagesRestoreLayoutPagesItemBoxesMedia media, + ChangeItemPagesRestoreLayoutPagesItemBoxesCrop crop, + ChangeItemPagesRestoreLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesRestoreLayoutPagesItemBoxesTrim trim, + ChangeItemPagesRestoreLayoutPagesItemBoxesArt art, + Map additionalProperties) { + this.media = media; + this.crop = crop; + this.bleed = bleed; + this.trim = trim; + this.art = art; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("media") + public ChangeItemPagesRestoreLayoutPagesItemBoxesMedia getMedia() { + return media; + } + + @JsonProperty("crop") + public ChangeItemPagesRestoreLayoutPagesItemBoxesCrop getCrop() { + return crop; + } + + @JsonProperty("bleed") + public ChangeItemPagesRestoreLayoutPagesItemBoxesBleed getBleed() { + return bleed; + } + + @JsonProperty("trim") + public ChangeItemPagesRestoreLayoutPagesItemBoxesTrim getTrim() { + return trim; + } + + @JsonProperty("art") + public ChangeItemPagesRestoreLayoutPagesItemBoxesArt getArt() { + return art; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxes + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxes) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxes other) { + return media.equals(other.media) + && crop.equals(other.crop) + && bleed.equals(other.bleed) + && trim.equals(other.trim) + && art.equals(other.art); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.media, this.crop, this.bleed, this.trim, this.art); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MediaStage builder() { + return new Builder(); + } + + public interface MediaStage { + CropStage media(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesMedia media); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxes other); + } + + public interface CropStage { + BleedStage crop(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesCrop crop); + } + + public interface BleedStage { + TrimStage bleed(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesBleed bleed); + } + + public interface TrimStage { + ArtStage trim(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesTrim trim); + } + + public interface ArtStage { + _FinalStage art(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesArt art); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxes build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { + private ChangeItemPagesRestoreLayoutPagesItemBoxesMedia media; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesCrop crop; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesBleed bleed; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesTrim trim; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesArt art; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxes other) { + media(other.getMedia()); + crop(other.getCrop()); + bleed(other.getBleed()); + trim(other.getTrim()); + art(other.getArt()); + return this; + } + + @java.lang.Override + @JsonSetter("media") + public CropStage media(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesMedia media) { + this.media = Objects.requireNonNull(media, "media must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("crop") + public BleedStage crop(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesCrop crop) { + this.crop = Objects.requireNonNull(crop, "crop must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("bleed") + public TrimStage bleed(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesBleed bleed) { + this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("trim") + public ArtStage trim(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesTrim trim) { + this.trim = Objects.requireNonNull(trim, "trim must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("art") + public _FinalStage art(@NotNull ChangeItemPagesRestoreLayoutPagesItemBoxesArt art) { + this.art = Objects.requireNonNull(art, "art must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxes build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxes(media, crop, bleed, trim, art, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesArt.java new file mode 100644 index 0000000..1f09b89 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesArt.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxesArt { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesArt( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxesArt) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxesArt other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesArt other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxesArt build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesArt other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesBleed.java new file mode 100644 index 0000000..9cb0f90 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesBleed.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxesBleed { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesBleed( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxesBleed) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxesBleed other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesBleed other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxesBleed build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesBleed other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesCrop.java new file mode 100644 index 0000000..8767d7d --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesCrop.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxesCrop { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesCrop( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxesCrop) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxesCrop other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesCrop other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxesCrop build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesCrop other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesMedia.java new file mode 100644 index 0000000..05f179a --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesMedia.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxesMedia { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesMedia( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxesMedia) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxesMedia other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesMedia other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxesMedia build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesMedia other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesTrim.java new file mode 100644 index 0000000..f02a4ac --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemBoxesTrim.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemBoxesTrim { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemBoxesTrim( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesRestoreLayoutPagesItemBoxesTrim) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemBoxesTrim other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesTrim other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemBoxesTrim build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemBoxesTrim other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesRestoreLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemPdfCropBox.java new file mode 100644 index 0000000..d14de81 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemPdfCropBox.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemPdfCropBox { + private final double left; + + private final double bottom; + + private final double right; + + private final double top; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemPdfCropBox( + double left, double bottom, double right, double top, Map additionalProperties) { + this.left = left; + this.bottom = bottom; + this.right = right; + this.top = top; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("left") + public double getLeft() { + return left; + } + + @JsonProperty("bottom") + public double getBottom() { + return bottom; + } + + @JsonProperty("right") + public double getRight() { + return right; + } + + @JsonProperty("top") + public double getTop() { + return top; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesRestoreLayoutPagesItemPdfCropBox) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemPdfCropBox other) { + return left == other.left && bottom == other.bottom && right == other.right && top == other.top; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.left, this.bottom, this.right, this.top); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LeftStage builder() { + return new Builder(); + } + + public interface LeftStage { + BottomStage left(double left); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemPdfCropBox other); + } + + public interface BottomStage { + RightStage bottom(double bottom); + } + + public interface RightStage { + TopStage right(double right); + } + + public interface TopStage { + _FinalStage top(double top); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemPdfCropBox build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LeftStage, BottomStage, RightStage, TopStage, _FinalStage { + private double left; + + private double bottom; + + private double right; + + private double top; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemPdfCropBox other) { + left(other.getLeft()); + bottom(other.getBottom()); + right(other.getRight()); + top(other.getTop()); + return this; + } + + @java.lang.Override + @JsonSetter("left") + public BottomStage left(double left) { + this.left = left; + return this; + } + + @java.lang.Override + @JsonSetter("bottom") + public RightStage bottom(double bottom) { + this.bottom = bottom; + return this; + } + + @java.lang.Override + @JsonSetter("right") + public TopStage right(double right) { + this.right = right; + return this; + } + + @java.lang.Override + @JsonSetter("top") + public _FinalStage top(double top) { + this.top = top; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesRestoreLayoutPagesItemPdfCropBox(left, bottom, right, top, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemSize.java new file mode 100644 index 0000000..8176f39 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemSize.java @@ -0,0 +1,141 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRestoreLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesRestoreLayoutPagesItemSize { + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRestoreLayoutPagesItemSize( + double width, double height, Map additionalProperties) { + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRestoreLayoutPagesItemSize + && equalTo((ChangeItemPagesRestoreLayoutPagesItemSize) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRestoreLayoutPagesItemSize other) { + return width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static WidthStage builder() { + return new Builder(); + } + + public interface WidthStage { + HeightStage width(double width); + + Builder from(ChangeItemPagesRestoreLayoutPagesItemSize other); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRestoreLayoutPagesItemSize build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements WidthStage, HeightStage, _FinalStage { + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRestoreLayoutPagesItemSize other) { + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRestoreLayoutPagesItemSize build() { + return new ChangeItemPagesRestoreLayoutPagesItemSize(width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemTabOrder.java new file mode 100644 index 0000000..4eb05f3 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRestoreLayoutPagesItemTabOrder.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ChangeItemPagesRestoreLayoutPagesItemTabOrder { + public static final ChangeItemPagesRestoreLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); + + public static final ChangeItemPagesRestoreLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + + public static final ChangeItemPagesRestoreLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + + public static final ChangeItemPagesRestoreLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.ROWS, "rows"); + + public static final ChangeItemPagesRestoreLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + + private final Value value; + + private final String string; + + ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof ChangeItemPagesRestoreLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesRestoreLayoutPagesItemTabOrder) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WIDGETS: + return visitor.visitWidgets(); + case COLUMNS: + return visitor.visitColumns(); + case ANNOTATIONS: + return visitor.visitAnnotations(); + case ROWS: + return visitor.visitRows(); + case STRUCTURE: + return visitor.visitStructure(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ChangeItemPagesRestoreLayoutPagesItemTabOrder valueOf(String value) { + switch (value) { + case "widgets": + return WIDGETS; + case "columns": + return COLUMNS; + case "annotations": + return ANNOTATIONS; + case "rows": + return ROWS; + case "structure": + return STRUCTURE; + default: + return new ChangeItemPagesRestoreLayoutPagesItemTabOrder(Value.UNKNOWN, value); + } + } + + public enum Value { + ROWS, + + COLUMNS, + + STRUCTURE, + + ANNOTATIONS, + + WIDGETS, + + UNKNOWN + } + + public interface Visitor { + T visitRows(); + + T visitColumns(); + + T visitStructure(); + + T visitAnnotations(); + + T visitWidgets(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotate.java b/src/main/java/api/types/ChangeItemPagesRotate.java new file mode 100644 index 0000000..7736134 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotate.java @@ -0,0 +1,214 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotate.Builder.class) +public final class ChangeItemPagesRotate { + private final List pages; + + private final double rotation; + + private final ChangeItemPagesRotateLayout layout; + + private final MutationMeta meta; + + private final Map additionalProperties; + + private ChangeItemPagesRotate( + List pages, + double rotation, + ChangeItemPagesRotateLayout layout, + MutationMeta meta, + Map additionalProperties) { + this.pages = pages; + this.rotation = rotation; + this.layout = layout; + this.meta = meta; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("rotation") + public double getRotation() { + return rotation; + } + + @JsonProperty("layout") + public ChangeItemPagesRotateLayout getLayout() { + return layout; + } + + @JsonProperty("meta") + public MutationMeta getMeta() { + return meta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotate && equalTo((ChangeItemPagesRotate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotate other) { + return pages.equals(other.pages) + && rotation == other.rotation + && layout.equals(other.layout) + && meta.equals(other.meta); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages, this.rotation, this.layout, this.meta); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RotationStage builder() { + return new Builder(); + } + + public interface RotationStage { + LayoutStage rotation(double rotation); + + Builder from(ChangeItemPagesRotate other); + } + + public interface LayoutStage { + MetaStage layout(@NotNull ChangeItemPagesRotateLayout layout); + } + + public interface MetaStage { + _FinalStage meta(@NotNull MutationMeta meta); + } + + public interface _FinalStage { + ChangeItemPagesRotate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(PageRef pages); + + _FinalStage addAllPages(List pages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RotationStage, LayoutStage, MetaStage, _FinalStage { + private double rotation; + + private ChangeItemPagesRotateLayout layout; + + private MutationMeta meta; + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotate other) { + pages(other.getPages()); + rotation(other.getRotation()); + layout(other.getLayout()); + meta(other.getMeta()); + return this; + } + + @java.lang.Override + @JsonSetter("rotation") + public LayoutStage rotation(double rotation) { + this.rotation = rotation; + return this; + } + + @java.lang.Override + @JsonSetter("layout") + public MetaStage layout(@NotNull ChangeItemPagesRotateLayout layout) { + this.layout = Objects.requireNonNull(layout, "layout must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("meta") + public _FinalStage meta(@NotNull MutationMeta meta) { + this.meta = Objects.requireNonNull(meta, "meta must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeItemPagesRotate build() { + return new ChangeItemPagesRotate(pages, rotation, layout, meta, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayout.java b/src/main/java/api/types/ChangeItemPagesRotateLayout.java new file mode 100644 index 0000000..f2bae50 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayout.java @@ -0,0 +1,206 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayout.Builder.class) +public final class ChangeItemPagesRotateLayout { + private final int pageCount; + + private final List pages; + + private final List namedPages; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayout( + int pageCount, + List pages, + List namedPages, + Map additionalProperties) { + this.pageCount = pageCount; + this.pages = pages; + this.namedPages = namedPages; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pageCount") + public int getPageCount() { + return pageCount; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("namedPages") + public List getNamedPages() { + return namedPages; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayout && equalTo((ChangeItemPagesRotateLayout) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayout other) { + return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pageCount, this.pages, this.namedPages); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PageCountStage builder() { + return new Builder(); + } + + public interface PageCountStage { + _FinalStage pageCount(int pageCount); + + Builder from(ChangeItemPagesRotateLayout other); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayout build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(ChangeItemPagesRotateLayoutPagesItem pages); + + _FinalStage addAllPages(List pages); + + _FinalStage namedPages(List namedPages); + + _FinalStage addNamedPages(ChangeItemPagesRotateLayoutNamedPagesItem namedPages); + + _FinalStage addAllNamedPages(List namedPages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PageCountStage, _FinalStage { + private int pageCount; + + private List namedPages = new ArrayList<>(); + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayout other) { + pageCount(other.getPageCount()); + pages(other.getPages()); + namedPages(other.getNamedPages()); + return this; + } + + @java.lang.Override + @JsonSetter("pageCount") + public _FinalStage pageCount(int pageCount) { + this.pageCount = pageCount; + return this; + } + + @java.lang.Override + public _FinalStage addAllNamedPages(List namedPages) { + if (namedPages != null) { + this.namedPages.addAll(namedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addNamedPages(ChangeItemPagesRotateLayoutNamedPagesItem namedPages) { + this.namedPages.add(namedPages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "namedPages", nulls = Nulls.SKIP) + public _FinalStage namedPages(List namedPages) { + this.namedPages.clear(); + if (namedPages != null) { + this.namedPages.addAll(namedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(ChangeItemPagesRotateLayoutPagesItem pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayout build() { + return new ChangeItemPagesRotateLayout(pageCount, pages, namedPages, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItem.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItem.java similarity index 71% rename from src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItem.java rename to src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItem.java index cf1d98f..63d566f 100644 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutNamedPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItem.java @@ -17,17 +17,17 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutNamedPagesItem.Builder.class) -public final class DocPagesRotate200ResponseLayoutNamedPagesItem { +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutNamedPagesItem.Builder.class) +public final class ChangeItemPagesRotateLayoutNamedPagesItem { private final String name; - private final DocPagesRotate200ResponseLayoutNamedPagesItemTarget target; + private final ChangeItemPagesRotateLayoutNamedPagesItemTarget target; private final Map additionalProperties; - private DocPagesRotate200ResponseLayoutNamedPagesItem( + private ChangeItemPagesRotateLayoutNamedPagesItem( String name, - DocPagesRotate200ResponseLayoutNamedPagesItemTarget target, + ChangeItemPagesRotateLayoutNamedPagesItemTarget target, Map additionalProperties) { this.name = name; this.target = target; @@ -40,15 +40,15 @@ public String getName() { } @JsonProperty("target") - public DocPagesRotate200ResponseLayoutNamedPagesItemTarget getTarget() { + public ChangeItemPagesRotateLayoutNamedPagesItemTarget getTarget() { return target; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutNamedPagesItem - && equalTo((DocPagesRotate200ResponseLayoutNamedPagesItem) other); + return other instanceof ChangeItemPagesRotateLayoutNamedPagesItem + && equalTo((ChangeItemPagesRotateLayoutNamedPagesItem) other); } @JsonAnyGetter @@ -56,7 +56,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesRotate200ResponseLayoutNamedPagesItem other) { + private boolean equalTo(ChangeItemPagesRotateLayoutNamedPagesItem other) { return name.equals(other.name) && target.equals(other.target); } @@ -77,15 +77,15 @@ public static NameStage builder() { public interface NameStage { TargetStage name(@NotNull String name); - Builder from(DocPagesRotate200ResponseLayoutNamedPagesItem other); + Builder from(ChangeItemPagesRotateLayoutNamedPagesItem other); } public interface TargetStage { - _FinalStage target(@NotNull DocPagesRotate200ResponseLayoutNamedPagesItemTarget target); + _FinalStage target(@NotNull ChangeItemPagesRotateLayoutNamedPagesItemTarget target); } public interface _FinalStage { - DocPagesRotate200ResponseLayoutNamedPagesItem build(); + ChangeItemPagesRotateLayoutNamedPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -96,7 +96,7 @@ public interface _FinalStage { public static final class Builder implements NameStage, TargetStage, _FinalStage { private String name; - private DocPagesRotate200ResponseLayoutNamedPagesItemTarget target; + private ChangeItemPagesRotateLayoutNamedPagesItemTarget target; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -104,7 +104,7 @@ public static final class Builder implements NameStage, TargetStage, _FinalStage private Builder() {} @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutNamedPagesItem other) { + public Builder from(ChangeItemPagesRotateLayoutNamedPagesItem other) { name(other.getName()); target(other.getTarget()); return this; @@ -119,14 +119,14 @@ public TargetStage name(@NotNull String name) { @java.lang.Override @JsonSetter("target") - public _FinalStage target(@NotNull DocPagesRotate200ResponseLayoutNamedPagesItemTarget target) { + public _FinalStage target(@NotNull ChangeItemPagesRotateLayoutNamedPagesItemTarget target) { this.target = Objects.requireNonNull(target, "target must not be null"); return this; } @java.lang.Override - public DocPagesRotate200ResponseLayoutNamedPagesItem build() { - return new DocPagesRotate200ResponseLayoutNamedPagesItem(name, target, additionalProperties); + public ChangeItemPagesRotateLayoutNamedPagesItem build() { + return new ChangeItemPagesRotateLayoutNamedPagesItem(name, target, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.java new file mode 100644 index 0000000..e0dfc30 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.java @@ -0,0 +1,286 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class ChangeItemPagesRotateLayoutNamedPagesItemTarget { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private ChangeItemPagesRotateLayoutNamedPagesItemTarget(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static ChangeItemPagesRotateLayoutNamedPagesItemTarget page( + ChangeItemPagesRotateLayoutNamedPagesItemTargetPage value) { + return new ChangeItemPagesRotateLayoutNamedPagesItemTarget(new PageValue(value)); + } + + public static ChangeItemPagesRotateLayoutNamedPagesItemTarget template( + ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate value) { + return new ChangeItemPagesRotateLayoutNamedPagesItemTarget(new TemplateValue(value)); + } + + public static ChangeItemPagesRotateLayoutNamedPagesItemTarget dangling( + ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling value) { + return new ChangeItemPagesRotateLayoutNamedPagesItemTarget(new DanglingValue(value)); + } + + public boolean isPage() { + return value instanceof PageValue; + } + + public boolean isTemplate() { + return value instanceof TemplateValue; + } + + public boolean isDangling() { + return value instanceof DanglingValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getPage() { + if (isPage()) { + return Optional.of(((PageValue) value).value); + } + return Optional.empty(); + } + + public Optional getTemplate() { + if (isTemplate()) { + return Optional.of(((TemplateValue) value).value); + } + return Optional.empty(); + } + + public Optional getDangling() { + if (isDangling()) { + return Optional.of(((DanglingValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutNamedPagesItemTarget + && value.equals(((ChangeItemPagesRotateLayoutNamedPagesItemTarget) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitPage(ChangeItemPagesRotateLayoutNamedPagesItemTargetPage page); + + T visitTemplate(ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate template); + + T visitDangling(ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling dangling); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(PageValue.class), + @JsonSubTypes.Type(TemplateValue.class), + @JsonSubTypes.Type(DanglingValue.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("page") + @JsonIgnoreProperties("kind") + private static final class PageValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesRotateLayoutNamedPagesItemTargetPage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageValue() {} + + private PageValue(ChangeItemPagesRotateLayoutNamedPagesItemTargetPage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPage(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageValue && equalTo((PageValue) other); + } + + private boolean equalTo(PageValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesRotateLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonTypeName("template") + @JsonIgnoreProperties("kind") + private static final class TemplateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private TemplateValue() {} + + private TemplateValue(ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitTemplate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TemplateValue && equalTo((TemplateValue) other); + } + + private boolean equalTo(TemplateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesRotateLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonTypeName("dangling") + @JsonIgnoreProperties("kind") + private static final class DanglingValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "kind", allowSetters = true) + private ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private DanglingValue() {} + + private DanglingValue(ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitDangling(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DanglingValue && equalTo((DanglingValue) other); + } + + private boolean equalTo(DanglingValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesRotateLayoutNamedPagesItemTarget{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("kind") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeItemPagesRotateLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling.java new file mode 100644 index 0000000..5d09b1b --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling.java @@ -0,0 +1,69 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling.Builder.class) +public final class ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling { + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling other) { + return this; + } + + public ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling build() { + return new ChangeItemPagesRotateLayoutNamedPagesItemTargetDangling(additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetPage.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetPage.java new file mode 100644 index 0000000..5abce18 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetPage.java @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutNamedPagesItemTargetPage.Builder.class) +public final class ChangeItemPagesRotateLayoutNamedPagesItemTargetPage { + private final PageRef page; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutNamedPagesItemTargetPage( + PageRef page, Map additionalProperties) { + this.page = page; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("page") + public PageRef getPage() { + return page; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutNamedPagesItemTargetPage + && equalTo((ChangeItemPagesRotateLayoutNamedPagesItemTargetPage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutNamedPagesItemTargetPage other) { + return page.equals(other.page); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.page); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PageStage builder() { + return new Builder(); + } + + public interface PageStage { + _FinalStage page(@NotNull PageRef page); + + Builder from(ChangeItemPagesRotateLayoutNamedPagesItemTargetPage other); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutNamedPagesItemTargetPage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PageStage, _FinalStage { + private PageRef page; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutNamedPagesItemTargetPage other) { + page(other.getPage()); + return this; + } + + @java.lang.Override + @JsonSetter("page") + public _FinalStage page(@NotNull PageRef page) { + this.page = Objects.requireNonNull(page, "page must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutNamedPagesItemTargetPage build() { + return new ChangeItemPagesRotateLayoutNamedPagesItemTargetPage(page, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate.java new file mode 100644 index 0000000..864a60d --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate.Builder.class) +public final class ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate { + private final int objectNumber; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate( + int objectNumber, Map additionalProperties) { + this.objectNumber = objectNumber; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("objectNumber") + public int getObjectNumber() { + return objectNumber; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate + && equalTo((ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate other) { + return objectNumber == other.objectNumber; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.objectNumber); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectNumberStage builder() { + return new Builder(); + } + + public interface ObjectNumberStage { + _FinalStage objectNumber(int objectNumber); + + Builder from(ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate other); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectNumberStage, _FinalStage { + private int objectNumber; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate other) { + objectNumber(other.getObjectNumber()); + return this; + } + + @java.lang.Override + @JsonSetter("objectNumber") + public _FinalStage objectNumber(int objectNumber) { + this.objectNumber = objectNumber; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate build() { + return new ChangeItemPagesRotateLayoutNamedPagesItemTargetTemplate(objectNumber, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItem.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItem.java similarity index 76% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItem.java rename to src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItem.java index e195258..76115fd 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItem.java +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItem.java @@ -22,40 +22,40 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItem.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItem { +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItem.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItem { private final int index; private final PageRef ref; private final Optional label; - private final DocPagesDelete200ResponseLayoutPagesItemSize size; + private final ChangeItemPagesRotateLayoutPagesItemSize size; private final double rotation; private final double userUnit; - private final Optional tabOrder; + private final Optional tabOrder; - private final DocPagesDelete200ResponseLayoutPagesItemBoxes boxes; + private final ChangeItemPagesRotateLayoutPagesItemBoxes boxes; - private final DocPagesDelete200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private final ChangeItemPagesRotateLayoutPagesItemPdfCropBox pdfCropBox; private final Optional actions; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItem( + private ChangeItemPagesRotateLayoutPagesItem( int index, PageRef ref, Optional label, - DocPagesDelete200ResponseLayoutPagesItemSize size, + ChangeItemPagesRotateLayoutPagesItemSize size, double rotation, double userUnit, - Optional tabOrder, - DocPagesDelete200ResponseLayoutPagesItemBoxes boxes, - DocPagesDelete200ResponseLayoutPagesItemPdfCropBox pdfCropBox, + Optional tabOrder, + ChangeItemPagesRotateLayoutPagesItemBoxes boxes, + ChangeItemPagesRotateLayoutPagesItemPdfCropBox pdfCropBox, Optional actions, Map additionalProperties) { this.index = index; @@ -90,7 +90,7 @@ public Optional getLabel() { } @JsonProperty("size") - public DocPagesDelete200ResponseLayoutPagesItemSize getSize() { + public ChangeItemPagesRotateLayoutPagesItemSize getSize() { return size; } @@ -105,7 +105,7 @@ public double getUserUnit() { } @JsonIgnore - public Optional getTabOrder() { + public Optional getTabOrder() { if (tabOrder == null) { return Optional.empty(); } @@ -113,12 +113,12 @@ public Optional getTabOrder() } @JsonProperty("boxes") - public DocPagesDelete200ResponseLayoutPagesItemBoxes getBoxes() { + public ChangeItemPagesRotateLayoutPagesItemBoxes getBoxes() { return boxes; } @JsonProperty("pdfCropBox") - public DocPagesDelete200ResponseLayoutPagesItemPdfCropBox getPdfCropBox() { + public ChangeItemPagesRotateLayoutPagesItemPdfCropBox getPdfCropBox() { return pdfCropBox; } @@ -135,15 +135,15 @@ private Optional _getLabel() { @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("tabOrder") - private Optional _getTabOrder() { + private Optional _getTabOrder() { return tabOrder; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItem - && equalTo((DocPagesDelete200ResponseLayoutPagesItem) other); + return other instanceof ChangeItemPagesRotateLayoutPagesItem + && equalTo((ChangeItemPagesRotateLayoutPagesItem) other); } @JsonAnyGetter @@ -151,7 +151,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItem other) { + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItem other) { return index == other.index && ref.equals(other.ref) && label.equals(other.label) @@ -191,7 +191,7 @@ public static IndexStage builder() { public interface IndexStage { RefStage index(int index); - Builder from(DocPagesDelete200ResponseLayoutPagesItem other); + Builder from(ChangeItemPagesRotateLayoutPagesItem other); } public interface RefStage { @@ -199,7 +199,7 @@ public interface RefStage { } public interface SizeStage { - RotationStage size(@NotNull DocPagesDelete200ResponseLayoutPagesItemSize size); + RotationStage size(@NotNull ChangeItemPagesRotateLayoutPagesItemSize size); } public interface RotationStage { @@ -211,15 +211,15 @@ public interface UserUnitStage { } public interface BoxesStage { - PdfCropBoxStage boxes(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxes boxes); + PdfCropBoxStage boxes(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxes boxes); } public interface PdfCropBoxStage { - _FinalStage pdfCropBox(@NotNull DocPagesDelete200ResponseLayoutPagesItemPdfCropBox pdfCropBox); + _FinalStage pdfCropBox(@NotNull ChangeItemPagesRotateLayoutPagesItemPdfCropBox pdfCropBox); } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItem build(); + ChangeItemPagesRotateLayoutPagesItem build(); _FinalStage additionalProperty(String key, Object value); @@ -231,11 +231,11 @@ public interface _FinalStage { _FinalStage label(Nullable label); - _FinalStage tabOrder(Optional tabOrder); + _FinalStage tabOrder(Optional tabOrder); - _FinalStage tabOrder(DocPagesDelete200ResponseLayoutPagesItemTabOrder tabOrder); + _FinalStage tabOrder(ChangeItemPagesRotateLayoutPagesItemTabOrder tabOrder); - _FinalStage tabOrder(Nullable tabOrder); + _FinalStage tabOrder(Nullable tabOrder); _FinalStage actions(Optional actions); @@ -256,19 +256,19 @@ public static final class Builder private PageRef ref; - private DocPagesDelete200ResponseLayoutPagesItemSize size; + private ChangeItemPagesRotateLayoutPagesItemSize size; private double rotation; private double userUnit; - private DocPagesDelete200ResponseLayoutPagesItemBoxes boxes; + private ChangeItemPagesRotateLayoutPagesItemBoxes boxes; - private DocPagesDelete200ResponseLayoutPagesItemPdfCropBox pdfCropBox; + private ChangeItemPagesRotateLayoutPagesItemPdfCropBox pdfCropBox; private Optional actions = Optional.empty(); - private Optional tabOrder = Optional.empty(); + private Optional tabOrder = Optional.empty(); private Optional label = Optional.empty(); @@ -278,7 +278,7 @@ public static final class Builder private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItem other) { + public Builder from(ChangeItemPagesRotateLayoutPagesItem other) { index(other.getIndex()); ref(other.getRef()); label(other.getLabel()); @@ -308,7 +308,7 @@ public SizeStage ref(@NotNull PageRef ref) { @java.lang.Override @JsonSetter("size") - public RotationStage size(@NotNull DocPagesDelete200ResponseLayoutPagesItemSize size) { + public RotationStage size(@NotNull ChangeItemPagesRotateLayoutPagesItemSize size) { this.size = Objects.requireNonNull(size, "size must not be null"); return this; } @@ -329,14 +329,14 @@ public BoxesStage userUnit(double userUnit) { @java.lang.Override @JsonSetter("boxes") - public PdfCropBoxStage boxes(@NotNull DocPagesDelete200ResponseLayoutPagesItemBoxes boxes) { + public PdfCropBoxStage boxes(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxes boxes) { this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); return this; } @java.lang.Override @JsonSetter("pdfCropBox") - public _FinalStage pdfCropBox(@NotNull DocPagesDelete200ResponseLayoutPagesItemPdfCropBox pdfCropBox) { + public _FinalStage pdfCropBox(@NotNull ChangeItemPagesRotateLayoutPagesItemPdfCropBox pdfCropBox) { this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); return this; } @@ -355,7 +355,7 @@ public _FinalStage actions(Optional actions) { } @java.lang.Override - public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Nullable tabOrder) { if (tabOrder.isNull()) { this.tabOrder = null; } else if (tabOrder.isEmpty()) { @@ -367,14 +367,14 @@ public _FinalStage tabOrder(Nullable tabOrder) { + public _FinalStage tabOrder(Optional tabOrder) { this.tabOrder = tabOrder; return this; } @@ -405,8 +405,8 @@ public _FinalStage label(Optional label) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItem build() { - return new DocPagesDelete200ResponseLayoutPagesItem( + public ChangeItemPagesRotateLayoutPagesItem build() { + return new ChangeItemPagesRotateLayoutPagesItem( index, ref, label, diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxes.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxes.java new file mode 100644 index 0000000..faf2aa4 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxes.java @@ -0,0 +1,217 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxes.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxes { + private final ChangeItemPagesRotateLayoutPagesItemBoxesMedia media; + + private final ChangeItemPagesRotateLayoutPagesItemBoxesCrop crop; + + private final ChangeItemPagesRotateLayoutPagesItemBoxesBleed bleed; + + private final ChangeItemPagesRotateLayoutPagesItemBoxesTrim trim; + + private final ChangeItemPagesRotateLayoutPagesItemBoxesArt art; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxes( + ChangeItemPagesRotateLayoutPagesItemBoxesMedia media, + ChangeItemPagesRotateLayoutPagesItemBoxesCrop crop, + ChangeItemPagesRotateLayoutPagesItemBoxesBleed bleed, + ChangeItemPagesRotateLayoutPagesItemBoxesTrim trim, + ChangeItemPagesRotateLayoutPagesItemBoxesArt art, + Map additionalProperties) { + this.media = media; + this.crop = crop; + this.bleed = bleed; + this.trim = trim; + this.art = art; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("media") + public ChangeItemPagesRotateLayoutPagesItemBoxesMedia getMedia() { + return media; + } + + @JsonProperty("crop") + public ChangeItemPagesRotateLayoutPagesItemBoxesCrop getCrop() { + return crop; + } + + @JsonProperty("bleed") + public ChangeItemPagesRotateLayoutPagesItemBoxesBleed getBleed() { + return bleed; + } + + @JsonProperty("trim") + public ChangeItemPagesRotateLayoutPagesItemBoxesTrim getTrim() { + return trim; + } + + @JsonProperty("art") + public ChangeItemPagesRotateLayoutPagesItemBoxesArt getArt() { + return art; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxes + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxes) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxes other) { + return media.equals(other.media) + && crop.equals(other.crop) + && bleed.equals(other.bleed) + && trim.equals(other.trim) + && art.equals(other.art); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.media, this.crop, this.bleed, this.trim, this.art); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MediaStage builder() { + return new Builder(); + } + + public interface MediaStage { + CropStage media(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesMedia media); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxes other); + } + + public interface CropStage { + BleedStage crop(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesCrop crop); + } + + public interface BleedStage { + TrimStage bleed(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesBleed bleed); + } + + public interface TrimStage { + ArtStage trim(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesTrim trim); + } + + public interface ArtStage { + _FinalStage art(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesArt art); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxes build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { + private ChangeItemPagesRotateLayoutPagesItemBoxesMedia media; + + private ChangeItemPagesRotateLayoutPagesItemBoxesCrop crop; + + private ChangeItemPagesRotateLayoutPagesItemBoxesBleed bleed; + + private ChangeItemPagesRotateLayoutPagesItemBoxesTrim trim; + + private ChangeItemPagesRotateLayoutPagesItemBoxesArt art; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxes other) { + media(other.getMedia()); + crop(other.getCrop()); + bleed(other.getBleed()); + trim(other.getTrim()); + art(other.getArt()); + return this; + } + + @java.lang.Override + @JsonSetter("media") + public CropStage media(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesMedia media) { + this.media = Objects.requireNonNull(media, "media must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("crop") + public BleedStage crop(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesCrop crop) { + this.crop = Objects.requireNonNull(crop, "crop must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("bleed") + public TrimStage bleed(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesBleed bleed) { + this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("trim") + public ArtStage trim(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesTrim trim) { + this.trim = Objects.requireNonNull(trim, "trim must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("art") + public _FinalStage art(@NotNull ChangeItemPagesRotateLayoutPagesItemBoxesArt art) { + this.art = Objects.requireNonNull(art, "art must not be null"); + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxes build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxes(media, crop, bleed, trim, art, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesArt.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesArt.java new file mode 100644 index 0000000..f9a1d31 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesArt.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxesArt.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxesArt { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxesArt( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxesArt + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxesArt) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxesArt other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesArt other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxesArt build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesArt other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxesArt build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesBleed.java new file mode 100644 index 0000000..25be41b --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesBleed.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxesBleed.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxesBleed { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxesBleed( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxesBleed + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxesBleed) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxesBleed other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesBleed other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxesBleed build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesBleed other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxesBleed build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesCrop.java new file mode 100644 index 0000000..6b95c57 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesCrop.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxesCrop.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxesCrop { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxesCrop( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxesCrop + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxesCrop) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxesCrop other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesCrop other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxesCrop build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesCrop other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxesCrop build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesMedia.java new file mode 100644 index 0000000..7eddd74 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesMedia.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxesMedia.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxesMedia { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxesMedia( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxesMedia + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxesMedia) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxesMedia other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesMedia other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxesMedia build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesMedia other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxesMedia build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesTrim.java new file mode 100644 index 0000000..8f899ff --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemBoxesTrim.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemBoxesTrim.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemBoxesTrim { + private final double x; + + private final double y; + + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemBoxesTrim( + double x, double y, double width, double height, Map additionalProperties) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("x") + public double getX() { + return x; + } + + @JsonProperty("y") + public double getY() { + return y; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemBoxesTrim + && equalTo((ChangeItemPagesRotateLayoutPagesItemBoxesTrim) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemBoxesTrim other) { + return x == other.x && y == other.y && width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.x, this.y, this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static XStage builder() { + return new Builder(); + } + + public interface XStage { + YStage x(double x); + + Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesTrim other); + } + + public interface YStage { + WidthStage y(double y); + } + + public interface WidthStage { + HeightStage width(double width); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemBoxesTrim build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { + private double x; + + private double y; + + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemBoxesTrim other) { + x(other.getX()); + y(other.getY()); + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("x") + public YStage x(double x) { + this.x = x; + return this; + } + + @java.lang.Override + @JsonSetter("y") + public WidthStage y(double y) { + this.y = y; + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemBoxesTrim build() { + return new ChangeItemPagesRotateLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemPdfCropBox.java new file mode 100644 index 0000000..9c6fa95 --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemPdfCropBox.java @@ -0,0 +1,185 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemPdfCropBox.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemPdfCropBox { + private final double left; + + private final double bottom; + + private final double right; + + private final double top; + + private final Map additionalProperties; + + private ChangeItemPagesRotateLayoutPagesItemPdfCropBox( + double left, double bottom, double right, double top, Map additionalProperties) { + this.left = left; + this.bottom = bottom; + this.right = right; + this.top = top; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("left") + public double getLeft() { + return left; + } + + @JsonProperty("bottom") + public double getBottom() { + return bottom; + } + + @JsonProperty("right") + public double getRight() { + return right; + } + + @JsonProperty("top") + public double getTop() { + return top; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeItemPagesRotateLayoutPagesItemPdfCropBox + && equalTo((ChangeItemPagesRotateLayoutPagesItemPdfCropBox) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemPdfCropBox other) { + return left == other.left && bottom == other.bottom && right == other.right && top == other.top; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.left, this.bottom, this.right, this.top); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LeftStage builder() { + return new Builder(); + } + + public interface LeftStage { + BottomStage left(double left); + + Builder from(ChangeItemPagesRotateLayoutPagesItemPdfCropBox other); + } + + public interface BottomStage { + RightStage bottom(double bottom); + } + + public interface RightStage { + TopStage right(double right); + } + + public interface TopStage { + _FinalStage top(double top); + } + + public interface _FinalStage { + ChangeItemPagesRotateLayoutPagesItemPdfCropBox build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LeftStage, BottomStage, RightStage, TopStage, _FinalStage { + private double left; + + private double bottom; + + private double right; + + private double top; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeItemPagesRotateLayoutPagesItemPdfCropBox other) { + left(other.getLeft()); + bottom(other.getBottom()); + right(other.getRight()); + top(other.getTop()); + return this; + } + + @java.lang.Override + @JsonSetter("left") + public BottomStage left(double left) { + this.left = left; + return this; + } + + @java.lang.Override + @JsonSetter("bottom") + public RightStage bottom(double bottom) { + this.bottom = bottom; + return this; + } + + @java.lang.Override + @JsonSetter("right") + public TopStage right(double right) { + this.right = right; + return this; + } + + @java.lang.Override + @JsonSetter("top") + public _FinalStage top(double top) { + this.top = top; + return this; + } + + @java.lang.Override + public ChangeItemPagesRotateLayoutPagesItemPdfCropBox build() { + return new ChangeItemPagesRotateLayoutPagesItemPdfCropBox(left, bottom, right, top, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemSize.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemSize.java similarity index 80% rename from src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemSize.java rename to src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemSize.java index 5e6fee2..11b4da7 100644 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemSize.java +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemSize.java @@ -16,15 +16,15 @@ import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemSize.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemSize { +@JsonDeserialize(builder = ChangeItemPagesRotateLayoutPagesItemSize.Builder.class) +public final class ChangeItemPagesRotateLayoutPagesItemSize { private final double width; private final double height; private final Map additionalProperties; - private DocPagesDelete200ResponseLayoutPagesItemSize( + private ChangeItemPagesRotateLayoutPagesItemSize( double width, double height, Map additionalProperties) { this.width = width; this.height = height; @@ -44,8 +44,8 @@ public double getHeight() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemSize - && equalTo((DocPagesDelete200ResponseLayoutPagesItemSize) other); + return other instanceof ChangeItemPagesRotateLayoutPagesItemSize + && equalTo((ChangeItemPagesRotateLayoutPagesItemSize) other); } @JsonAnyGetter @@ -53,7 +53,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemSize other) { + private boolean equalTo(ChangeItemPagesRotateLayoutPagesItemSize other) { return width == other.width && height == other.height; } @@ -74,7 +74,7 @@ public static WidthStage builder() { public interface WidthStage { HeightStage width(double width); - Builder from(DocPagesDelete200ResponseLayoutPagesItemSize other); + Builder from(ChangeItemPagesRotateLayoutPagesItemSize other); } public interface HeightStage { @@ -82,7 +82,7 @@ public interface HeightStage { } public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemSize build(); + ChangeItemPagesRotateLayoutPagesItemSize build(); _FinalStage additionalProperty(String key, Object value); @@ -101,7 +101,7 @@ public static final class Builder implements WidthStage, HeightStage, _FinalStag private Builder() {} @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemSize other) { + public Builder from(ChangeItemPagesRotateLayoutPagesItemSize other) { width(other.getWidth()); height(other.getHeight()); return this; @@ -122,8 +122,8 @@ public _FinalStage height(double height) { } @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemSize build() { - return new DocPagesDelete200ResponseLayoutPagesItemSize(width, height, additionalProperties); + public ChangeItemPagesRotateLayoutPagesItemSize build() { + return new ChangeItemPagesRotateLayoutPagesItemSize(width, height, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemTabOrder.java b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemTabOrder.java new file mode 100644 index 0000000..b5db60b --- /dev/null +++ b/src/main/java/api/types/ChangeItemPagesRotateLayoutPagesItemTabOrder.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ChangeItemPagesRotateLayoutPagesItemTabOrder { + public static final ChangeItemPagesRotateLayoutPagesItemTabOrder WIDGETS = + new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); + + public static final ChangeItemPagesRotateLayoutPagesItemTabOrder COLUMNS = + new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); + + public static final ChangeItemPagesRotateLayoutPagesItemTabOrder ANNOTATIONS = + new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); + + public static final ChangeItemPagesRotateLayoutPagesItemTabOrder ROWS = + new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.ROWS, "rows"); + + public static final ChangeItemPagesRotateLayoutPagesItemTabOrder STRUCTURE = + new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); + + private final Value value; + + private final String string; + + ChangeItemPagesRotateLayoutPagesItemTabOrder(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof ChangeItemPagesRotateLayoutPagesItemTabOrder + && this.string.equals(((ChangeItemPagesRotateLayoutPagesItemTabOrder) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WIDGETS: + return visitor.visitWidgets(); + case COLUMNS: + return visitor.visitColumns(); + case ANNOTATIONS: + return visitor.visitAnnotations(); + case ROWS: + return visitor.visitRows(); + case STRUCTURE: + return visitor.visitStructure(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ChangeItemPagesRotateLayoutPagesItemTabOrder valueOf(String value) { + switch (value) { + case "widgets": + return WIDGETS; + case "columns": + return COLUMNS; + case "annotations": + return ANNOTATIONS; + case "rows": + return ROWS; + case "structure": + return STRUCTURE; + default: + return new ChangeItemPagesRotateLayoutPagesItemTabOrder(Value.UNKNOWN, value); + } + } + + public enum Value { + ROWS, + + COLUMNS, + + STRUCTURE, + + ANNOTATIONS, + + WIDGETS, + + UNKNOWN + } + + public interface Visitor { + T visitRows(); + + T visitColumns(); + + T visitStructure(); + + T visitAnnotations(); + + T visitWidgets(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/api/types/ChangeItemSkippedOp.java b/src/main/java/api/types/ChangeItemSkippedOp.java index 53ba1c4..1d6c37a 100644 --- a/src/main/java/api/types/ChangeItemSkippedOp.java +++ b/src/main/java/api/types/ChangeItemSkippedOp.java @@ -7,68 +7,109 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ChangeItemSkippedOp { - public static final ChangeItemSkippedOp FORMS_UPDATE = new ChangeItemSkippedOp(Value.FORMS_UPDATE, "forms.update"); + public static final ChangeItemSkippedOp PAGES_INSERT_BLANK = + new ChangeItemSkippedOp(Value.PAGES_INSERT_BLANK, "pages.insertBlank"); public static final ChangeItemSkippedOp ANNOTATIONS_DELETE = new ChangeItemSkippedOp(Value.ANNOTATIONS_DELETE, "annotations.delete"); public static final ChangeItemSkippedOp FORMS_DELETE = new ChangeItemSkippedOp(Value.FORMS_DELETE, "forms.delete"); - public static final ChangeItemSkippedOp ANNOTATIONS_UPDATE = - new ChangeItemSkippedOp(Value.ANNOTATIONS_UPDATE, "annotations.update"); + public static final ChangeItemSkippedOp PAGES_RESTORE = + new ChangeItemSkippedOp(Value.PAGES_RESTORE, "pages.restore"); - public static final ChangeItemSkippedOp ANNOTATIONS_RESTORE = - new ChangeItemSkippedOp(Value.ANNOTATIONS_RESTORE, "annotations.restore"); + public static final ChangeItemSkippedOp OUTLINE_MOVE = new ChangeItemSkippedOp(Value.OUTLINE_MOVE, "outline.move"); + + public static final ChangeItemSkippedOp OUTLINE_UPDATE = + new ChangeItemSkippedOp(Value.OUTLINE_UPDATE, "outline.update"); + + public static final ChangeItemSkippedOp PAGES_ROTATE = new ChangeItemSkippedOp(Value.PAGES_ROTATE, "pages.rotate"); + + public static final ChangeItemSkippedOp ATTACHMENTS_DELETE = + new ChangeItemSkippedOp(Value.ATTACHMENTS_DELETE, "attachments.delete"); public static final ChangeItemSkippedOp FORMS_SET_APPEARANCE_TEXT = new ChangeItemSkippedOp(Value.FORMS_SET_APPEARANCE_TEXT, "forms.setAppearanceText"); + public static final ChangeItemSkippedOp PAGES_DELETE = new ChangeItemSkippedOp(Value.PAGES_DELETE, "pages.delete"); + public static final ChangeItemSkippedOp FORMS_SET_VALUE = new ChangeItemSkippedOp(Value.FORMS_SET_VALUE, "forms.setValue"); public static final ChangeItemSkippedOp FORMS_UPDATE_WIDGET = new ChangeItemSkippedOp(Value.FORMS_UPDATE_WIDGET, "forms.updateWidget"); - public static final ChangeItemSkippedOp FORMS_RESET = new ChangeItemSkippedOp(Value.FORMS_RESET, "forms.reset"); - public static final ChangeItemSkippedOp METADATA_UPDATE_CUSTOM = new ChangeItemSkippedOp(Value.METADATA_UPDATE_CUSTOM, "metadata.updateCustom"); public static final ChangeItemSkippedOp FORMS_REORDER_WIDGETS = new ChangeItemSkippedOp(Value.FORMS_REORDER_WIDGETS, "forms.reorderWidgets"); - public static final ChangeItemSkippedOp FORMS_ADD_WIDGET = - new ChangeItemSkippedOp(Value.FORMS_ADD_WIDGET, "forms.addWidget"); + public static final ChangeItemSkippedOp OUTLINE_CREATE = + new ChangeItemSkippedOp(Value.OUTLINE_CREATE, "outline.create"); public static final ChangeItemSkippedOp FORMS_DELETE_WIDGET = new ChangeItemSkippedOp(Value.FORMS_DELETE_WIDGET, "forms.deleteWidget"); - public static final ChangeItemSkippedOp ANNOTATIONS_CREATE = - new ChangeItemSkippedOp(Value.ANNOTATIONS_CREATE, "annotations.create"); + public static final ChangeItemSkippedOp PAGES_REORDER = + new ChangeItemSkippedOp(Value.PAGES_REORDER, "pages.reorder"); public static final ChangeItemSkippedOp FORMS_CREATE = new ChangeItemSkippedOp(Value.FORMS_CREATE, "forms.create"); - public static final ChangeItemSkippedOp FORMS_SET_SIGNATURE_APPEARANCE = - new ChangeItemSkippedOp(Value.FORMS_SET_SIGNATURE_APPEARANCE, "forms.setSignatureAppearance"); - - public static final ChangeItemSkippedOp ANNOTATIONS_REORDER = - new ChangeItemSkippedOp(Value.ANNOTATIONS_REORDER, "annotations.reorder"); - public static final ChangeItemSkippedOp FORMS_RESTORE = new ChangeItemSkippedOp(Value.FORMS_RESTORE, "forms.restore"); - public static final ChangeItemSkippedOp FORMS_SET_DISPLAY = - new ChangeItemSkippedOp(Value.FORMS_SET_DISPLAY, "forms.setDisplay"); - public static final ChangeItemSkippedOp FORMS_REORDER_CALCULATIONS = new ChangeItemSkippedOp(Value.FORMS_REORDER_CALCULATIONS, "forms.reorderCalculations"); public static final ChangeItemSkippedOp METADATA_UPDATE = new ChangeItemSkippedOp(Value.METADATA_UPDATE, "metadata.update"); + public static final ChangeItemSkippedOp ATTACHMENTS_CREATE = + new ChangeItemSkippedOp(Value.ATTACHMENTS_CREATE, "attachments.create"); + public static final ChangeItemSkippedOp FORMS_REMOVE_WIDGET = new ChangeItemSkippedOp(Value.FORMS_REMOVE_WIDGET, "forms.removeWidget"); + public static final ChangeItemSkippedOp OUTLINE_RESTORE = + new ChangeItemSkippedOp(Value.OUTLINE_RESTORE, "outline.restore"); + + public static final ChangeItemSkippedOp FORMS_UPDATE = new ChangeItemSkippedOp(Value.FORMS_UPDATE, "forms.update"); + + public static final ChangeItemSkippedOp OUTLINE_DELETE = + new ChangeItemSkippedOp(Value.OUTLINE_DELETE, "outline.delete"); + + public static final ChangeItemSkippedOp FORMS_RESTORE_WIDGET = + new ChangeItemSkippedOp(Value.FORMS_RESTORE_WIDGET, "forms.restoreWidget"); + + public static final ChangeItemSkippedOp ATTACHMENTS_RESTORE = + new ChangeItemSkippedOp(Value.ATTACHMENTS_RESTORE, "attachments.restore"); + + public static final ChangeItemSkippedOp ANNOTATIONS_UPDATE = + new ChangeItemSkippedOp(Value.ANNOTATIONS_UPDATE, "annotations.update"); + + public static final ChangeItemSkippedOp ANNOTATIONS_RESTORE = + new ChangeItemSkippedOp(Value.ANNOTATIONS_RESTORE, "annotations.restore"); + + public static final ChangeItemSkippedOp PAGES_INSERT = new ChangeItemSkippedOp(Value.PAGES_INSERT, "pages.insert"); + + public static final ChangeItemSkippedOp FORMS_RESET = new ChangeItemSkippedOp(Value.FORMS_RESET, "forms.reset"); + + public static final ChangeItemSkippedOp FORMS_ADD_WIDGET = + new ChangeItemSkippedOp(Value.FORMS_ADD_WIDGET, "forms.addWidget"); + + public static final ChangeItemSkippedOp ANNOTATIONS_CREATE = + new ChangeItemSkippedOp(Value.ANNOTATIONS_CREATE, "annotations.create"); + + public static final ChangeItemSkippedOp FORMS_SET_SIGNATURE_APPEARANCE = + new ChangeItemSkippedOp(Value.FORMS_SET_SIGNATURE_APPEARANCE, "forms.setSignatureAppearance"); + + public static final ChangeItemSkippedOp ANNOTATIONS_REORDER = + new ChangeItemSkippedOp(Value.ANNOTATIONS_REORDER, "annotations.reorder"); + + public static final ChangeItemSkippedOp FORMS_SET_DISPLAY = + new ChangeItemSkippedOp(Value.FORMS_SET_DISPLAY, "forms.setDisplay"); + private final Value value; private final String string; @@ -101,50 +142,80 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case FORMS_UPDATE: - return visitor.visitFormsUpdate(); + case PAGES_INSERT_BLANK: + return visitor.visitPagesInsertBlank(); case ANNOTATIONS_DELETE: return visitor.visitAnnotationsDelete(); case FORMS_DELETE: return visitor.visitFormsDelete(); - case ANNOTATIONS_UPDATE: - return visitor.visitAnnotationsUpdate(); - case ANNOTATIONS_RESTORE: - return visitor.visitAnnotationsRestore(); + case PAGES_RESTORE: + return visitor.visitPagesRestore(); + case OUTLINE_MOVE: + return visitor.visitOutlineMove(); + case OUTLINE_UPDATE: + return visitor.visitOutlineUpdate(); + case PAGES_ROTATE: + return visitor.visitPagesRotate(); + case ATTACHMENTS_DELETE: + return visitor.visitAttachmentsDelete(); case FORMS_SET_APPEARANCE_TEXT: return visitor.visitFormsSetAppearanceText(); + case PAGES_DELETE: + return visitor.visitPagesDelete(); case FORMS_SET_VALUE: return visitor.visitFormsSetValue(); case FORMS_UPDATE_WIDGET: return visitor.visitFormsUpdateWidget(); - case FORMS_RESET: - return visitor.visitFormsReset(); case METADATA_UPDATE_CUSTOM: return visitor.visitMetadataUpdateCustom(); case FORMS_REORDER_WIDGETS: return visitor.visitFormsReorderWidgets(); - case FORMS_ADD_WIDGET: - return visitor.visitFormsAddWidget(); + case OUTLINE_CREATE: + return visitor.visitOutlineCreate(); case FORMS_DELETE_WIDGET: return visitor.visitFormsDeleteWidget(); - case ANNOTATIONS_CREATE: - return visitor.visitAnnotationsCreate(); + case PAGES_REORDER: + return visitor.visitPagesReorder(); case FORMS_CREATE: return visitor.visitFormsCreate(); - case FORMS_SET_SIGNATURE_APPEARANCE: - return visitor.visitFormsSetSignatureAppearance(); - case ANNOTATIONS_REORDER: - return visitor.visitAnnotationsReorder(); case FORMS_RESTORE: return visitor.visitFormsRestore(); - case FORMS_SET_DISPLAY: - return visitor.visitFormsSetDisplay(); case FORMS_REORDER_CALCULATIONS: return visitor.visitFormsReorderCalculations(); case METADATA_UPDATE: return visitor.visitMetadataUpdate(); + case ATTACHMENTS_CREATE: + return visitor.visitAttachmentsCreate(); case FORMS_REMOVE_WIDGET: return visitor.visitFormsRemoveWidget(); + case OUTLINE_RESTORE: + return visitor.visitOutlineRestore(); + case FORMS_UPDATE: + return visitor.visitFormsUpdate(); + case OUTLINE_DELETE: + return visitor.visitOutlineDelete(); + case FORMS_RESTORE_WIDGET: + return visitor.visitFormsRestoreWidget(); + case ATTACHMENTS_RESTORE: + return visitor.visitAttachmentsRestore(); + case ANNOTATIONS_UPDATE: + return visitor.visitAnnotationsUpdate(); + case ANNOTATIONS_RESTORE: + return visitor.visitAnnotationsRestore(); + case PAGES_INSERT: + return visitor.visitPagesInsert(); + case FORMS_RESET: + return visitor.visitFormsReset(); + case FORMS_ADD_WIDGET: + return visitor.visitFormsAddWidget(); + case ANNOTATIONS_CREATE: + return visitor.visitAnnotationsCreate(); + case FORMS_SET_SIGNATURE_APPEARANCE: + return visitor.visitFormsSetSignatureAppearance(); + case ANNOTATIONS_REORDER: + return visitor.visitAnnotationsReorder(); + case FORMS_SET_DISPLAY: + return visitor.visitFormsSetDisplay(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -154,50 +225,80 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ChangeItemSkippedOp valueOf(String value) { switch (value) { - case "forms.update": - return FORMS_UPDATE; + case "pages.insertBlank": + return PAGES_INSERT_BLANK; case "annotations.delete": return ANNOTATIONS_DELETE; case "forms.delete": return FORMS_DELETE; - case "annotations.update": - return ANNOTATIONS_UPDATE; - case "annotations.restore": - return ANNOTATIONS_RESTORE; + case "pages.restore": + return PAGES_RESTORE; + case "outline.move": + return OUTLINE_MOVE; + case "outline.update": + return OUTLINE_UPDATE; + case "pages.rotate": + return PAGES_ROTATE; + case "attachments.delete": + return ATTACHMENTS_DELETE; case "forms.setAppearanceText": return FORMS_SET_APPEARANCE_TEXT; + case "pages.delete": + return PAGES_DELETE; case "forms.setValue": return FORMS_SET_VALUE; case "forms.updateWidget": return FORMS_UPDATE_WIDGET; - case "forms.reset": - return FORMS_RESET; case "metadata.updateCustom": return METADATA_UPDATE_CUSTOM; case "forms.reorderWidgets": return FORMS_REORDER_WIDGETS; - case "forms.addWidget": - return FORMS_ADD_WIDGET; + case "outline.create": + return OUTLINE_CREATE; case "forms.deleteWidget": return FORMS_DELETE_WIDGET; - case "annotations.create": - return ANNOTATIONS_CREATE; + case "pages.reorder": + return PAGES_REORDER; case "forms.create": return FORMS_CREATE; - case "forms.setSignatureAppearance": - return FORMS_SET_SIGNATURE_APPEARANCE; - case "annotations.reorder": - return ANNOTATIONS_REORDER; case "forms.restore": return FORMS_RESTORE; - case "forms.setDisplay": - return FORMS_SET_DISPLAY; case "forms.reorderCalculations": return FORMS_REORDER_CALCULATIONS; case "metadata.update": return METADATA_UPDATE; + case "attachments.create": + return ATTACHMENTS_CREATE; case "forms.removeWidget": return FORMS_REMOVE_WIDGET; + case "outline.restore": + return OUTLINE_RESTORE; + case "forms.update": + return FORMS_UPDATE; + case "outline.delete": + return OUTLINE_DELETE; + case "forms.restoreWidget": + return FORMS_RESTORE_WIDGET; + case "attachments.restore": + return ATTACHMENTS_RESTORE; + case "annotations.update": + return ANNOTATIONS_UPDATE; + case "annotations.restore": + return ANNOTATIONS_RESTORE; + case "pages.insert": + return PAGES_INSERT; + case "forms.reset": + return FORMS_RESET; + case "forms.addWidget": + return FORMS_ADD_WIDGET; + case "annotations.create": + return ANNOTATIONS_CREATE; + case "forms.setSignatureAppearance": + return FORMS_SET_SIGNATURE_APPEARANCE; + case "annotations.reorder": + return ANNOTATIONS_REORDER; + case "forms.setDisplay": + return FORMS_SET_DISPLAY; default: return new ChangeItemSkippedOp(Value.UNKNOWN, value); } @@ -244,10 +345,40 @@ public enum Value { METADATA_UPDATE_CUSTOM, + OUTLINE_CREATE, + + OUTLINE_UPDATE, + + OUTLINE_MOVE, + + OUTLINE_DELETE, + + PAGES_ROTATE, + + PAGES_REORDER, + + PAGES_DELETE, + + PAGES_INSERT_BLANK, + + PAGES_INSERT, + + ATTACHMENTS_CREATE, + + ATTACHMENTS_DELETE, + ANNOTATIONS_RESTORE, FORMS_RESTORE, + FORMS_RESTORE_WIDGET, + + OUTLINE_RESTORE, + + PAGES_RESTORE, + + ATTACHMENTS_RESTORE, + UNKNOWN } @@ -292,10 +423,40 @@ public interface Visitor { T visitMetadataUpdateCustom(); + T visitOutlineCreate(); + + T visitOutlineUpdate(); + + T visitOutlineMove(); + + T visitOutlineDelete(); + + T visitPagesRotate(); + + T visitPagesReorder(); + + T visitPagesDelete(); + + T visitPagesInsertBlank(); + + T visitPagesInsert(); + + T visitAttachmentsCreate(); + + T visitAttachmentsDelete(); + T visitAnnotationsRestore(); T visitFormsRestore(); + T visitFormsRestoreWidget(); + + T visitOutlineRestore(); + + T visitPagesRestore(); + + T visitAttachmentsRestore(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/api/types/ChangeOp.java b/src/main/java/api/types/ChangeOp.java index cf2ddaa..d2a94cb 100644 --- a/src/main/java/api/types/ChangeOp.java +++ b/src/main/java/api/types/ChangeOp.java @@ -106,6 +106,50 @@ public static ChangeOp metadataUpdateCustom(ChangeOpMetadataUpdateCustom value) return new ChangeOp(new MetadataUpdateCustomValue(value)); } + public static ChangeOp outlineCreate(ChangeOpOutlineCreate value) { + return new ChangeOp(new OutlineCreateValue(value)); + } + + public static ChangeOp outlineUpdate(ChangeOpOutlineUpdate value) { + return new ChangeOp(new OutlineUpdateValue(value)); + } + + public static ChangeOp outlineMove(ChangeOpOutlineMove value) { + return new ChangeOp(new OutlineMoveValue(value)); + } + + public static ChangeOp outlineDelete(ChangeOpOutlineDelete value) { + return new ChangeOp(new OutlineDeleteValue(value)); + } + + public static ChangeOp pagesRotate(ChangeOpPagesRotate value) { + return new ChangeOp(new PagesRotateValue(value)); + } + + public static ChangeOp pagesReorder(ChangeOpPagesReorder value) { + return new ChangeOp(new PagesReorderValue(value)); + } + + public static ChangeOp pagesDelete(ChangeOpPagesDelete value) { + return new ChangeOp(new PagesDeleteValue(value)); + } + + public static ChangeOp pagesInsertBlank(ChangeOpPagesInsertBlank value) { + return new ChangeOp(new PagesInsertBlankValue(value)); + } + + public static ChangeOp pagesInsert(ChangeOpPagesInsert value) { + return new ChangeOp(new PagesInsertValue(value)); + } + + public static ChangeOp attachmentsCreate(ChangeOpAttachmentsCreate value) { + return new ChangeOp(new AttachmentsCreateValue(value)); + } + + public static ChangeOp attachmentsDelete(ChangeOpAttachmentsDelete value) { + return new ChangeOp(new AttachmentsDeleteValue(value)); + } + public boolean isAnnotationsCreate() { return value instanceof AnnotationsCreateValue; } @@ -186,6 +230,50 @@ public boolean isMetadataUpdateCustom() { return value instanceof MetadataUpdateCustomValue; } + public boolean isOutlineCreate() { + return value instanceof OutlineCreateValue; + } + + public boolean isOutlineUpdate() { + return value instanceof OutlineUpdateValue; + } + + public boolean isOutlineMove() { + return value instanceof OutlineMoveValue; + } + + public boolean isOutlineDelete() { + return value instanceof OutlineDeleteValue; + } + + public boolean isPagesRotate() { + return value instanceof PagesRotateValue; + } + + public boolean isPagesReorder() { + return value instanceof PagesReorderValue; + } + + public boolean isPagesDelete() { + return value instanceof PagesDeleteValue; + } + + public boolean isPagesInsertBlank() { + return value instanceof PagesInsertBlankValue; + } + + public boolean isPagesInsert() { + return value instanceof PagesInsertValue; + } + + public boolean isAttachmentsCreate() { + return value instanceof AttachmentsCreateValue; + } + + public boolean isAttachmentsDelete() { + return value instanceof AttachmentsDeleteValue; + } + public boolean _isUnknown() { return value instanceof _UnknownValue; } @@ -330,6 +418,83 @@ public Optional getMetadataUpdateCustom() { return Optional.empty(); } + public Optional getOutlineCreate() { + if (isOutlineCreate()) { + return Optional.of(((OutlineCreateValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineUpdate() { + if (isOutlineUpdate()) { + return Optional.of(((OutlineUpdateValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineMove() { + if (isOutlineMove()) { + return Optional.of(((OutlineMoveValue) value).value); + } + return Optional.empty(); + } + + public Optional getOutlineDelete() { + if (isOutlineDelete()) { + return Optional.of(((OutlineDeleteValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesRotate() { + if (isPagesRotate()) { + return Optional.of(((PagesRotateValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesReorder() { + if (isPagesReorder()) { + return Optional.of(((PagesReorderValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesDelete() { + if (isPagesDelete()) { + return Optional.of(((PagesDeleteValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesInsertBlank() { + if (isPagesInsertBlank()) { + return Optional.of(((PagesInsertBlankValue) value).value); + } + return Optional.empty(); + } + + public Optional getPagesInsert() { + if (isPagesInsert()) { + return Optional.of(((PagesInsertValue) value).value); + } + return Optional.empty(); + } + + public Optional getAttachmentsCreate() { + if (isAttachmentsCreate()) { + return Optional.of(((AttachmentsCreateValue) value).value); + } + return Optional.empty(); + } + + public Optional getAttachmentsDelete() { + if (isAttachmentsDelete()) { + return Optional.of(((AttachmentsDeleteValue) value).value); + } + return Optional.empty(); + } + public Optional _getUnknown() { if (_isUnknown()) { return Optional.of(((_UnknownValue) value).value); @@ -399,6 +564,28 @@ public interface Visitor { T visitMetadataUpdateCustom(ChangeOpMetadataUpdateCustom metadataUpdateCustom); + T visitOutlineCreate(ChangeOpOutlineCreate outlineCreate); + + T visitOutlineUpdate(ChangeOpOutlineUpdate outlineUpdate); + + T visitOutlineMove(ChangeOpOutlineMove outlineMove); + + T visitOutlineDelete(ChangeOpOutlineDelete outlineDelete); + + T visitPagesRotate(ChangeOpPagesRotate pagesRotate); + + T visitPagesReorder(ChangeOpPagesReorder pagesReorder); + + T visitPagesDelete(ChangeOpPagesDelete pagesDelete); + + T visitPagesInsertBlank(ChangeOpPagesInsertBlank pagesInsertBlank); + + T visitPagesInsert(ChangeOpPagesInsert pagesInsert); + + T visitAttachmentsCreate(ChangeOpAttachmentsCreate attachmentsCreate); + + T visitAttachmentsDelete(ChangeOpAttachmentsDelete attachmentsDelete); + T _visitUnknown(Object unknownType); } @@ -423,7 +610,18 @@ public interface Visitor { @JsonSubTypes.Type(FormsUpdateWidgetValue.class), @JsonSubTypes.Type(FormsSetSignatureAppearanceValue.class), @JsonSubTypes.Type(MetadataUpdateValue.class), - @JsonSubTypes.Type(MetadataUpdateCustomValue.class) + @JsonSubTypes.Type(MetadataUpdateCustomValue.class), + @JsonSubTypes.Type(OutlineCreateValue.class), + @JsonSubTypes.Type(OutlineUpdateValue.class), + @JsonSubTypes.Type(OutlineMoveValue.class), + @JsonSubTypes.Type(OutlineDeleteValue.class), + @JsonSubTypes.Type(PagesRotateValue.class), + @JsonSubTypes.Type(PagesReorderValue.class), + @JsonSubTypes.Type(PagesDeleteValue.class), + @JsonSubTypes.Type(PagesInsertBlankValue.class), + @JsonSubTypes.Type(PagesInsertValue.class), + @JsonSubTypes.Type(AttachmentsCreateValue.class), + @JsonSubTypes.Type(AttachmentsDeleteValue.class) }) @JsonIgnoreProperties(ignoreUnknown = true) private interface Value { @@ -1231,6 +1429,446 @@ public String toString() { } } + @JsonTypeName("outline.create") + @JsonIgnoreProperties("type") + private static final class OutlineCreateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpOutlineCreate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineCreateValue() {} + + private OutlineCreateValue(ChangeOpOutlineCreate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineCreate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineCreateValue && equalTo((OutlineCreateValue) other); + } + + private boolean equalTo(OutlineCreateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.update") + @JsonIgnoreProperties("type") + private static final class OutlineUpdateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpOutlineUpdate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineUpdateValue() {} + + private OutlineUpdateValue(ChangeOpOutlineUpdate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineUpdate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineUpdateValue && equalTo((OutlineUpdateValue) other); + } + + private boolean equalTo(OutlineUpdateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.move") + @JsonIgnoreProperties("type") + private static final class OutlineMoveValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpOutlineMove value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineMoveValue() {} + + private OutlineMoveValue(ChangeOpOutlineMove value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineMove(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineMoveValue && equalTo((OutlineMoveValue) other); + } + + private boolean equalTo(OutlineMoveValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("outline.delete") + @JsonIgnoreProperties("type") + private static final class OutlineDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpOutlineDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OutlineDeleteValue() {} + + private OutlineDeleteValue(ChangeOpOutlineDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOutlineDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineDeleteValue && equalTo((OutlineDeleteValue) other); + } + + private boolean equalTo(OutlineDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.rotate") + @JsonIgnoreProperties("type") + private static final class PagesRotateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpPagesRotate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesRotateValue() {} + + private PagesRotateValue(ChangeOpPagesRotate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesRotate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesRotateValue && equalTo((PagesRotateValue) other); + } + + private boolean equalTo(PagesRotateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.reorder") + @JsonIgnoreProperties("type") + private static final class PagesReorderValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpPagesReorder value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesReorderValue() {} + + private PagesReorderValue(ChangeOpPagesReorder value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesReorder(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesReorderValue && equalTo((PagesReorderValue) other); + } + + private boolean equalTo(PagesReorderValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.delete") + @JsonIgnoreProperties("type") + private static final class PagesDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpPagesDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesDeleteValue() {} + + private PagesDeleteValue(ChangeOpPagesDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesDeleteValue && equalTo((PagesDeleteValue) other); + } + + private boolean equalTo(PagesDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.insertBlank") + @JsonIgnoreProperties("type") + private static final class PagesInsertBlankValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpPagesInsertBlank value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesInsertBlankValue() {} + + private PagesInsertBlankValue(ChangeOpPagesInsertBlank value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesInsertBlank(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesInsertBlankValue && equalTo((PagesInsertBlankValue) other); + } + + private boolean equalTo(PagesInsertBlankValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("pages.insert") + @JsonIgnoreProperties("type") + private static final class PagesInsertValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpPagesInsert value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PagesInsertValue() {} + + private PagesInsertValue(ChangeOpPagesInsert value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPagesInsert(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PagesInsertValue && equalTo((PagesInsertValue) other); + } + + private boolean equalTo(PagesInsertValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("attachments.create") + @JsonIgnoreProperties("type") + private static final class AttachmentsCreateValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpAttachmentsCreate value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AttachmentsCreateValue() {} + + private AttachmentsCreateValue(ChangeOpAttachmentsCreate value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAttachmentsCreate(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentsCreateValue && equalTo((AttachmentsCreateValue) other); + } + + private boolean equalTo(AttachmentsCreateValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("attachments.delete") + @JsonIgnoreProperties("type") + private static final class AttachmentsDeleteValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private ChangeOpAttachmentsDelete value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AttachmentsDeleteValue() {} + + private AttachmentsDeleteValue(ChangeOpAttachmentsDelete value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAttachmentsDelete(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentsDeleteValue && equalTo((AttachmentsDeleteValue) other); + } + + private boolean equalTo(AttachmentsDeleteValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ChangeOp{" + "value: " + value + "}"; + } + } + @JsonIgnoreProperties("type") private static final class _UnknownValue implements Value { private String type; diff --git a/src/main/java/api/types/ChangeOpAttachmentsCreate.java b/src/main/java/api/types/ChangeOpAttachmentsCreate.java new file mode 100644 index 0000000..92b31a0 --- /dev/null +++ b/src/main/java/api/types/ChangeOpAttachmentsCreate.java @@ -0,0 +1,143 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpAttachmentsCreate.Builder.class) +public final class ChangeOpAttachmentsCreate { + private final AttachmentFileBase file; + + private final ChangeOpAttachmentsCreateResources resources; + + private final Map additionalProperties; + + private ChangeOpAttachmentsCreate( + AttachmentFileBase file, + ChangeOpAttachmentsCreateResources resources, + Map additionalProperties) { + this.file = file; + this.resources = resources; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("file") + public AttachmentFileBase getFile() { + return file; + } + + @JsonProperty("resources") + public ChangeOpAttachmentsCreateResources getResources() { + return resources; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpAttachmentsCreate && equalTo((ChangeOpAttachmentsCreate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpAttachmentsCreate other) { + return file.equals(other.file) && resources.equals(other.resources); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.file, this.resources); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static FileStage builder() { + return new Builder(); + } + + public interface FileStage { + ResourcesStage file(@NotNull AttachmentFileBase file); + + Builder from(ChangeOpAttachmentsCreate other); + } + + public interface ResourcesStage { + _FinalStage resources(@NotNull ChangeOpAttachmentsCreateResources resources); + } + + public interface _FinalStage { + ChangeOpAttachmentsCreate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements FileStage, ResourcesStage, _FinalStage { + private AttachmentFileBase file; + + private ChangeOpAttachmentsCreateResources resources; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpAttachmentsCreate other) { + file(other.getFile()); + resources(other.getResources()); + return this; + } + + @java.lang.Override + @JsonSetter("file") + public ResourcesStage file(@NotNull AttachmentFileBase file) { + this.file = Objects.requireNonNull(file, "file must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("resources") + public _FinalStage resources(@NotNull ChangeOpAttachmentsCreateResources resources) { + this.resources = Objects.requireNonNull(resources, "resources must not be null"); + return this; + } + + @java.lang.Override + public ChangeOpAttachmentsCreate build() { + return new ChangeOpAttachmentsCreate(file, resources, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpAttachmentsCreateResources.java b/src/main/java/api/types/ChangeOpAttachmentsCreateResources.java new file mode 100644 index 0000000..b739c79 --- /dev/null +++ b/src/main/java/api/types/ChangeOpAttachmentsCreateResources.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpAttachmentsCreateResources.Builder.class) +public final class ChangeOpAttachmentsCreateResources { + private final String file; + + private final Map additionalProperties; + + private ChangeOpAttachmentsCreateResources(String file, Map additionalProperties) { + this.file = file; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("file") + public String getFile() { + return file; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpAttachmentsCreateResources + && equalTo((ChangeOpAttachmentsCreateResources) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpAttachmentsCreateResources other) { + return file.equals(other.file); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.file); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static FileStage builder() { + return new Builder(); + } + + public interface FileStage { + _FinalStage file(@NotNull String file); + + Builder from(ChangeOpAttachmentsCreateResources other); + } + + public interface _FinalStage { + ChangeOpAttachmentsCreateResources build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements FileStage, _FinalStage { + private String file; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpAttachmentsCreateResources other) { + file(other.getFile()); + return this; + } + + @java.lang.Override + @JsonSetter("file") + public _FinalStage file(@NotNull String file) { + this.file = Objects.requireNonNull(file, "file must not be null"); + return this; + } + + @java.lang.Override + public ChangeOpAttachmentsCreateResources build() { + return new ChangeOpAttachmentsCreateResources(file, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpAttachmentsDelete.java b/src/main/java/api/types/ChangeOpAttachmentsDelete.java new file mode 100644 index 0000000..c0c4ac7 --- /dev/null +++ b/src/main/java/api/types/ChangeOpAttachmentsDelete.java @@ -0,0 +1,118 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpAttachmentsDelete.Builder.class) +public final class ChangeOpAttachmentsDelete { + private final AttachmentRef ref; + + private final Map additionalProperties; + + private ChangeOpAttachmentsDelete(AttachmentRef ref, Map additionalProperties) { + this.ref = ref; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("ref") + public AttachmentRef getRef() { + return ref; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpAttachmentsDelete && equalTo((ChangeOpAttachmentsDelete) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpAttachmentsDelete other) { + return ref.equals(other.ref); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.ref); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RefStage builder() { + return new Builder(); + } + + public interface RefStage { + _FinalStage ref(@NotNull AttachmentRef ref); + + Builder from(ChangeOpAttachmentsDelete other); + } + + public interface _FinalStage { + ChangeOpAttachmentsDelete build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RefStage, _FinalStage { + private AttachmentRef ref; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpAttachmentsDelete other) { + ref(other.getRef()); + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public _FinalStage ref(@NotNull AttachmentRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + public ChangeOpAttachmentsDelete build() { + return new ChangeOpAttachmentsDelete(ref, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpOutlineCreate.java b/src/main/java/api/types/ChangeOpOutlineCreate.java new file mode 100644 index 0000000..1106a13 --- /dev/null +++ b/src/main/java/api/types/ChangeOpOutlineCreate.java @@ -0,0 +1,238 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpOutlineCreate.Builder.class) +public final class ChangeOpOutlineCreate { + private final Optional parent; + + private final Optional position; + + private final OutlineItemDraft data; + + private final Optional objectNumber; + + private final Map additionalProperties; + + private ChangeOpOutlineCreate( + Optional parent, + Optional position, + OutlineItemDraft data, + Optional objectNumber, + Map additionalProperties) { + this.parent = parent; + this.position = position; + this.data = data; + this.objectNumber = objectNumber; + this.additionalProperties = additionalProperties; + } + + @JsonIgnore + public Optional getParent() { + if (parent == null) { + return Optional.empty(); + } + return parent; + } + + @JsonProperty("position") + public Optional getPosition() { + return position; + } + + @JsonProperty("data") + public OutlineItemDraft getData() { + return data; + } + + @JsonProperty("objectNumber") + public Optional getObjectNumber() { + return objectNumber; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parent") + private Optional _getParent() { + return parent; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpOutlineCreate && equalTo((ChangeOpOutlineCreate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpOutlineCreate other) { + return parent.equals(other.parent) + && position.equals(other.position) + && data.equals(other.data) + && objectNumber.equals(other.objectNumber); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.parent, this.position, this.data, this.objectNumber); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DataStage builder() { + return new Builder(); + } + + public interface DataStage { + _FinalStage data(@NotNull OutlineItemDraft data); + + Builder from(ChangeOpOutlineCreate other); + } + + public interface _FinalStage { + ChangeOpOutlineCreate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage parent(Optional parent); + + _FinalStage parent(OutlineItemRef parent); + + _FinalStage parent(Nullable parent); + + _FinalStage position(Optional position); + + _FinalStage position(OutlinePosition position); + + _FinalStage objectNumber(Optional objectNumber); + + _FinalStage objectNumber(Integer objectNumber); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DataStage, _FinalStage { + private OutlineItemDraft data; + + private Optional objectNumber = Optional.empty(); + + private Optional position = Optional.empty(); + + private Optional parent = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpOutlineCreate other) { + parent(other.getParent()); + position(other.getPosition()); + data(other.getData()); + objectNumber(other.getObjectNumber()); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public _FinalStage data(@NotNull OutlineItemDraft data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage objectNumber(Integer objectNumber) { + this.objectNumber = Optional.ofNullable(objectNumber); + return this; + } + + @java.lang.Override + @JsonSetter(value = "objectNumber", nulls = Nulls.SKIP) + public _FinalStage objectNumber(Optional objectNumber) { + this.objectNumber = objectNumber; + return this; + } + + @java.lang.Override + public _FinalStage position(OutlinePosition position) { + this.position = Optional.ofNullable(position); + return this; + } + + @java.lang.Override + @JsonSetter(value = "position", nulls = Nulls.SKIP) + public _FinalStage position(Optional position) { + this.position = position; + return this; + } + + @java.lang.Override + public _FinalStage parent(Nullable parent) { + if (parent.isNull()) { + this.parent = null; + } else if (parent.isEmpty()) { + this.parent = Optional.empty(); + } else { + this.parent = Optional.of(parent.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage parent(OutlineItemRef parent) { + this.parent = Optional.ofNullable(parent); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parent", nulls = Nulls.SKIP) + public _FinalStage parent(Optional parent) { + this.parent = parent; + return this; + } + + @java.lang.Override + public ChangeOpOutlineCreate build() { + return new ChangeOpOutlineCreate(parent, position, data, objectNumber, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemSize.java b/src/main/java/api/types/ChangeOpOutlineDelete.java similarity index 50% rename from src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemSize.java rename to src/main/java/api/types/ChangeOpOutlineDelete.java index f125e1c..287c043 100644 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemSize.java +++ b/src/main/java/api/types/ChangeOpOutlineDelete.java @@ -10,42 +10,44 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemSize.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemSize { - private final double width; +@JsonDeserialize(builder = ChangeOpOutlineDelete.Builder.class) +public final class ChangeOpOutlineDelete { + private final OutlineItemRef ref; - private final double height; + private final Optional expect; private final Map additionalProperties; - private DocPagesInsertBlank200ResponseLayoutPagesItemSize( - double width, double height, Map additionalProperties) { - this.width = width; - this.height = height; + private ChangeOpOutlineDelete( + OutlineItemRef ref, Optional expect, Map additionalProperties) { + this.ref = ref; + this.expect = expect; this.additionalProperties = additionalProperties; } - @JsonProperty("width") - public double getWidth() { - return width; + @JsonProperty("ref") + public OutlineItemRef getRef() { + return ref; } - @JsonProperty("height") - public double getHeight() { - return height; + @JsonProperty("expect") + public Optional getExpect() { + return expect; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemSize - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemSize) other); + return other instanceof ChangeOpOutlineDelete && equalTo((ChangeOpOutlineDelete) other); } @JsonAnyGetter @@ -53,13 +55,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemSize other) { - return width == other.width && height == other.height; + private boolean equalTo(ChangeOpOutlineDelete other) { + return ref.equals(other.ref) && expect.equals(other.expect); } @java.lang.Override public int hashCode() { - return Objects.hash(this.width, this.height); + return Objects.hash(this.ref, this.expect); } @java.lang.Override @@ -67,33 +69,33 @@ public String toString() { return ObjectMappers.stringify(this); } - public static WidthStage builder() { + public static RefStage builder() { return new Builder(); } - public interface WidthStage { - HeightStage width(double width); + public interface RefStage { + _FinalStage ref(@NotNull OutlineItemRef ref); - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemSize other); - } - - public interface HeightStage { - _FinalStage height(double height); + Builder from(ChangeOpOutlineDelete other); } public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemSize build(); + ChangeOpOutlineDelete build(); _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage expect(Optional expect); + + _FinalStage expect(OutlineItemPatch expect); } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements WidthStage, HeightStage, _FinalStage { - private double width; + public static final class Builder implements RefStage, _FinalStage { + private OutlineItemRef ref; - private double height; + private Optional expect = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -101,29 +103,35 @@ public static final class Builder implements WidthStage, HeightStage, _FinalStag private Builder() {} @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemSize other) { - width(other.getWidth()); - height(other.getHeight()); + public Builder from(ChangeOpOutlineDelete other) { + ref(other.getRef()); + expect(other.getExpect()); + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public _FinalStage ref(@NotNull OutlineItemRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); return this; } @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; + public _FinalStage expect(OutlineItemPatch expect) { + this.expect = Optional.ofNullable(expect); return this; } @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; + @JsonSetter(value = "expect", nulls = Nulls.SKIP) + public _FinalStage expect(Optional expect) { + this.expect = expect; return this; } @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemSize build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemSize(width, height, additionalProperties); + public ChangeOpOutlineDelete build() { + return new ChangeOpOutlineDelete(ref, expect, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/ChangeOpOutlineMove.java b/src/main/java/api/types/ChangeOpOutlineMove.java new file mode 100644 index 0000000..a4b1873 --- /dev/null +++ b/src/main/java/api/types/ChangeOpOutlineMove.java @@ -0,0 +1,221 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpOutlineMove.Builder.class) +public final class ChangeOpOutlineMove { + private final List refs; + + private final Optional parent; + + private final OutlinePosition position; + + private final Map additionalProperties; + + private ChangeOpOutlineMove( + List refs, + Optional parent, + OutlinePosition position, + Map additionalProperties) { + this.refs = refs; + this.parent = parent; + this.position = position; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("refs") + public List getRefs() { + return refs; + } + + @JsonIgnore + public Optional getParent() { + if (parent == null) { + return Optional.empty(); + } + return parent; + } + + @JsonProperty("position") + public OutlinePosition getPosition() { + return position; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parent") + private Optional _getParent() { + return parent; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpOutlineMove && equalTo((ChangeOpOutlineMove) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpOutlineMove other) { + return refs.equals(other.refs) && parent.equals(other.parent) && position.equals(other.position); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.refs, this.parent, this.position); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PositionStage builder() { + return new Builder(); + } + + public interface PositionStage { + _FinalStage position(@NotNull OutlinePosition position); + + Builder from(ChangeOpOutlineMove other); + } + + public interface _FinalStage { + ChangeOpOutlineMove build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage refs(List refs); + + _FinalStage addRefs(OutlineItemRef refs); + + _FinalStage addAllRefs(List refs); + + _FinalStage parent(Optional parent); + + _FinalStage parent(OutlineItemRef parent); + + _FinalStage parent(Nullable parent); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PositionStage, _FinalStage { + private OutlinePosition position; + + private Optional parent = Optional.empty(); + + private List refs = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpOutlineMove other) { + refs(other.getRefs()); + parent(other.getParent()); + position(other.getPosition()); + return this; + } + + @java.lang.Override + @JsonSetter("position") + public _FinalStage position(@NotNull OutlinePosition position) { + this.position = Objects.requireNonNull(position, "position must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parent(Nullable parent) { + if (parent.isNull()) { + this.parent = null; + } else if (parent.isEmpty()) { + this.parent = Optional.empty(); + } else { + this.parent = Optional.of(parent.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage parent(OutlineItemRef parent) { + this.parent = Optional.ofNullable(parent); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parent", nulls = Nulls.SKIP) + public _FinalStage parent(Optional parent) { + this.parent = parent; + return this; + } + + @java.lang.Override + public _FinalStage addAllRefs(List refs) { + if (refs != null) { + this.refs.addAll(refs); + } + return this; + } + + @java.lang.Override + public _FinalStage addRefs(OutlineItemRef refs) { + this.refs.add(refs); + return this; + } + + @java.lang.Override + @JsonSetter(value = "refs", nulls = Nulls.SKIP) + public _FinalStage refs(List refs) { + this.refs.clear(); + if (refs != null) { + this.refs.addAll(refs); + } + return this; + } + + @java.lang.Override + public ChangeOpOutlineMove build() { + return new ChangeOpOutlineMove(refs, parent, position, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpOutlineUpdate.java b/src/main/java/api/types/ChangeOpOutlineUpdate.java new file mode 100644 index 0000000..90e2f5f --- /dev/null +++ b/src/main/java/api/types/ChangeOpOutlineUpdate.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpOutlineUpdate.Builder.class) +public final class ChangeOpOutlineUpdate { + private final OutlineItemRef ref; + + private final OutlineItemPatch patch; + + private final Optional expect; + + private final Map additionalProperties; + + private ChangeOpOutlineUpdate( + OutlineItemRef ref, + OutlineItemPatch patch, + Optional expect, + Map additionalProperties) { + this.ref = ref; + this.patch = patch; + this.expect = expect; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("ref") + public OutlineItemRef getRef() { + return ref; + } + + @JsonProperty("patch") + public OutlineItemPatch getPatch() { + return patch; + } + + @JsonProperty("expect") + public Optional getExpect() { + return expect; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpOutlineUpdate && equalTo((ChangeOpOutlineUpdate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpOutlineUpdate other) { + return ref.equals(other.ref) && patch.equals(other.patch) && expect.equals(other.expect); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.ref, this.patch, this.expect); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RefStage builder() { + return new Builder(); + } + + public interface RefStage { + PatchStage ref(@NotNull OutlineItemRef ref); + + Builder from(ChangeOpOutlineUpdate other); + } + + public interface PatchStage { + _FinalStage patch(@NotNull OutlineItemPatch patch); + } + + public interface _FinalStage { + ChangeOpOutlineUpdate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage expect(Optional expect); + + _FinalStage expect(OutlineItemPatch expect); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RefStage, PatchStage, _FinalStage { + private OutlineItemRef ref; + + private OutlineItemPatch patch; + + private Optional expect = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpOutlineUpdate other) { + ref(other.getRef()); + patch(other.getPatch()); + expect(other.getExpect()); + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public PatchStage ref(@NotNull OutlineItemRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("patch") + public _FinalStage patch(@NotNull OutlineItemPatch patch) { + this.patch = Objects.requireNonNull(patch, "patch must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage expect(OutlineItemPatch expect) { + this.expect = Optional.ofNullable(expect); + return this; + } + + @java.lang.Override + @JsonSetter(value = "expect", nulls = Nulls.SKIP) + public _FinalStage expect(Optional expect) { + this.expect = expect; + return this; + } + + @java.lang.Override + public ChangeOpOutlineUpdate build() { + return new ChangeOpOutlineUpdate(ref, patch, expect, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesDelete.java b/src/main/java/api/types/ChangeOpPagesDelete.java new file mode 100644 index 0000000..ac83835 --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesDelete.java @@ -0,0 +1,116 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesDelete.Builder.class) +public final class ChangeOpPagesDelete { + private final List pages; + + private final Map additionalProperties; + + private ChangeOpPagesDelete(List pages, Map additionalProperties) { + this.pages = pages; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesDelete && equalTo((ChangeOpPagesDelete) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesDelete other) { + return pages.equals(other.pages); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ChangeOpPagesDelete other) { + pages(other.getPages()); + return this; + } + + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public Builder pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + public Builder addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + public Builder addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + public ChangeOpPagesDelete build() { + return new ChangeOpPagesDelete(pages, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesInsert.java b/src/main/java/api/types/ChangeOpPagesInsert.java new file mode 100644 index 0000000..d8503fa --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesInsert.java @@ -0,0 +1,151 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesInsert.Builder.class) +public final class ChangeOpPagesInsert { + private final ChangeOpPagesInsertResources resources; + + private final Optional position; + + private final Map additionalProperties; + + private ChangeOpPagesInsert( + ChangeOpPagesInsertResources resources, + Optional position, + Map additionalProperties) { + this.resources = resources; + this.position = position; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("resources") + public ChangeOpPagesInsertResources getResources() { + return resources; + } + + @JsonProperty("position") + public Optional getPosition() { + return position; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesInsert && equalTo((ChangeOpPagesInsert) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesInsert other) { + return resources.equals(other.resources) && position.equals(other.position); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.resources, this.position); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ResourcesStage builder() { + return new Builder(); + } + + public interface ResourcesStage { + _FinalStage resources(@NotNull ChangeOpPagesInsertResources resources); + + Builder from(ChangeOpPagesInsert other); + } + + public interface _FinalStage { + ChangeOpPagesInsert build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage position(Optional position); + + _FinalStage position(PagePosition position); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ResourcesStage, _FinalStage { + private ChangeOpPagesInsertResources resources; + + private Optional position = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesInsert other) { + resources(other.getResources()); + position(other.getPosition()); + return this; + } + + @java.lang.Override + @JsonSetter("resources") + public _FinalStage resources(@NotNull ChangeOpPagesInsertResources resources) { + this.resources = Objects.requireNonNull(resources, "resources must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage position(PagePosition position) { + this.position = Optional.ofNullable(position); + return this; + } + + @java.lang.Override + @JsonSetter(value = "position", nulls = Nulls.SKIP) + public _FinalStage position(Optional position) { + this.position = position; + return this; + } + + @java.lang.Override + public ChangeOpPagesInsert build() { + return new ChangeOpPagesInsert(resources, position, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesInsertBlank.java b/src/main/java/api/types/ChangeOpPagesInsertBlank.java new file mode 100644 index 0000000..a7ae6d2 --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesInsertBlank.java @@ -0,0 +1,181 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesInsertBlank.Builder.class) +public final class ChangeOpPagesInsertBlank { + private final ChangeOpPagesInsertBlankSpec spec; + + private final Optional position; + + private final Optional> objectNumbers; + + private final Map additionalProperties; + + private ChangeOpPagesInsertBlank( + ChangeOpPagesInsertBlankSpec spec, + Optional position, + Optional> objectNumbers, + Map additionalProperties) { + this.spec = spec; + this.position = position; + this.objectNumbers = objectNumbers; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("spec") + public ChangeOpPagesInsertBlankSpec getSpec() { + return spec; + } + + @JsonProperty("position") + public Optional getPosition() { + return position; + } + + @JsonProperty("objectNumbers") + public Optional> getObjectNumbers() { + return objectNumbers; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesInsertBlank && equalTo((ChangeOpPagesInsertBlank) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesInsertBlank other) { + return spec.equals(other.spec) && position.equals(other.position) && objectNumbers.equals(other.objectNumbers); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.spec, this.position, this.objectNumbers); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecStage builder() { + return new Builder(); + } + + public interface SpecStage { + _FinalStage spec(@NotNull ChangeOpPagesInsertBlankSpec spec); + + Builder from(ChangeOpPagesInsertBlank other); + } + + public interface _FinalStage { + ChangeOpPagesInsertBlank build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage position(Optional position); + + _FinalStage position(PagePosition position); + + _FinalStage objectNumbers(Optional> objectNumbers); + + _FinalStage objectNumbers(List objectNumbers); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SpecStage, _FinalStage { + private ChangeOpPagesInsertBlankSpec spec; + + private Optional> objectNumbers = Optional.empty(); + + private Optional position = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesInsertBlank other) { + spec(other.getSpec()); + position(other.getPosition()); + objectNumbers(other.getObjectNumbers()); + return this; + } + + @java.lang.Override + @JsonSetter("spec") + public _FinalStage spec(@NotNull ChangeOpPagesInsertBlankSpec spec) { + this.spec = Objects.requireNonNull(spec, "spec must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage objectNumbers(List objectNumbers) { + this.objectNumbers = Optional.ofNullable(objectNumbers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "objectNumbers", nulls = Nulls.SKIP) + public _FinalStage objectNumbers(Optional> objectNumbers) { + this.objectNumbers = objectNumbers; + return this; + } + + @java.lang.Override + public _FinalStage position(PagePosition position) { + this.position = Optional.ofNullable(position); + return this; + } + + @java.lang.Override + @JsonSetter(value = "position", nulls = Nulls.SKIP) + public _FinalStage position(Optional position) { + this.position = position; + return this; + } + + @java.lang.Override + public ChangeOpPagesInsertBlank build() { + return new ChangeOpPagesInsertBlank(spec, position, objectNumbers, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesInsertBlankSpec.java b/src/main/java/api/types/ChangeOpPagesInsertBlankSpec.java new file mode 100644 index 0000000..97502ba --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesInsertBlankSpec.java @@ -0,0 +1,149 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesInsertBlankSpec.Builder.class) +public final class ChangeOpPagesInsertBlankSpec { + private final ChangeOpPagesInsertBlankSpecSize size; + + private final Optional count; + + private final Map additionalProperties; + + private ChangeOpPagesInsertBlankSpec( + ChangeOpPagesInsertBlankSpecSize size, Optional count, Map additionalProperties) { + this.size = size; + this.count = count; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("size") + public ChangeOpPagesInsertBlankSpecSize getSize() { + return size; + } + + @JsonProperty("count") + public Optional getCount() { + return count; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesInsertBlankSpec && equalTo((ChangeOpPagesInsertBlankSpec) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesInsertBlankSpec other) { + return size.equals(other.size) && count.equals(other.count); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.size, this.count); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SizeStage builder() { + return new Builder(); + } + + public interface SizeStage { + _FinalStage size(@NotNull ChangeOpPagesInsertBlankSpecSize size); + + Builder from(ChangeOpPagesInsertBlankSpec other); + } + + public interface _FinalStage { + ChangeOpPagesInsertBlankSpec build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage count(Optional count); + + _FinalStage count(Integer count); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SizeStage, _FinalStage { + private ChangeOpPagesInsertBlankSpecSize size; + + private Optional count = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesInsertBlankSpec other) { + size(other.getSize()); + count(other.getCount()); + return this; + } + + @java.lang.Override + @JsonSetter("size") + public _FinalStage size(@NotNull ChangeOpPagesInsertBlankSpecSize size) { + this.size = Objects.requireNonNull(size, "size must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage count(Integer count) { + this.count = Optional.ofNullable(count); + return this; + } + + @java.lang.Override + @JsonSetter(value = "count", nulls = Nulls.SKIP) + public _FinalStage count(Optional count) { + this.count = count; + return this; + } + + @java.lang.Override + public ChangeOpPagesInsertBlankSpec build() { + return new ChangeOpPagesInsertBlankSpec(size, count, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesInsertBlankSpecSize.java b/src/main/java/api/types/ChangeOpPagesInsertBlankSpecSize.java new file mode 100644 index 0000000..f30dc6f --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesInsertBlankSpecSize.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesInsertBlankSpecSize.Builder.class) +public final class ChangeOpPagesInsertBlankSpecSize { + private final double width; + + private final double height; + + private final Map additionalProperties; + + private ChangeOpPagesInsertBlankSpecSize(double width, double height, Map additionalProperties) { + this.width = width; + this.height = height; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("width") + public double getWidth() { + return width; + } + + @JsonProperty("height") + public double getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesInsertBlankSpecSize && equalTo((ChangeOpPagesInsertBlankSpecSize) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesInsertBlankSpecSize other) { + return width == other.width && height == other.height; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.width, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static WidthStage builder() { + return new Builder(); + } + + public interface WidthStage { + HeightStage width(double width); + + Builder from(ChangeOpPagesInsertBlankSpecSize other); + } + + public interface HeightStage { + _FinalStage height(double height); + } + + public interface _FinalStage { + ChangeOpPagesInsertBlankSpecSize build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements WidthStage, HeightStage, _FinalStage { + private double width; + + private double height; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesInsertBlankSpecSize other) { + width(other.getWidth()); + height(other.getHeight()); + return this; + } + + @java.lang.Override + @JsonSetter("width") + public HeightStage width(double width) { + this.width = width; + return this; + } + + @java.lang.Override + @JsonSetter("height") + public _FinalStage height(double height) { + this.height = height; + return this; + } + + @java.lang.Override + public ChangeOpPagesInsertBlankSpecSize build() { + return new ChangeOpPagesInsertBlankSpecSize(width, height, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesInsertResources.java b/src/main/java/api/types/ChangeOpPagesInsertResources.java new file mode 100644 index 0000000..c4a4fd8 --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesInsertResources.java @@ -0,0 +1,118 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesInsertResources.Builder.class) +public final class ChangeOpPagesInsertResources { + private final String source; + + private final Map additionalProperties; + + private ChangeOpPagesInsertResources(String source, Map additionalProperties) { + this.source = source; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("source") + public String getSource() { + return source; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesInsertResources && equalTo((ChangeOpPagesInsertResources) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesInsertResources other) { + return source.equals(other.source); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.source); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SourceStage builder() { + return new Builder(); + } + + public interface SourceStage { + _FinalStage source(@NotNull String source); + + Builder from(ChangeOpPagesInsertResources other); + } + + public interface _FinalStage { + ChangeOpPagesInsertResources build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SourceStage, _FinalStage { + private String source; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesInsertResources other) { + source(other.getSource()); + return this; + } + + @java.lang.Override + @JsonSetter("source") + public _FinalStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + @java.lang.Override + public ChangeOpPagesInsertResources build() { + return new ChangeOpPagesInsertResources(source, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesReorder.java b/src/main/java/api/types/ChangeOpPagesReorder.java new file mode 100644 index 0000000..23a3353 --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesReorder.java @@ -0,0 +1,162 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesReorder.Builder.class) +public final class ChangeOpPagesReorder { + private final List pages; + + private final PagePosition position; + + private final Map additionalProperties; + + private ChangeOpPagesReorder(List pages, PagePosition position, Map additionalProperties) { + this.pages = pages; + this.position = position; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("position") + public PagePosition getPosition() { + return position; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesReorder && equalTo((ChangeOpPagesReorder) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesReorder other) { + return pages.equals(other.pages) && position.equals(other.position); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages, this.position); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PositionStage builder() { + return new Builder(); + } + + public interface PositionStage { + _FinalStage position(@NotNull PagePosition position); + + Builder from(ChangeOpPagesReorder other); + } + + public interface _FinalStage { + ChangeOpPagesReorder build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(PageRef pages); + + _FinalStage addAllPages(List pages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PositionStage, _FinalStage { + private PagePosition position; + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesReorder other) { + pages(other.getPages()); + position(other.getPosition()); + return this; + } + + @java.lang.Override + @JsonSetter("position") + public _FinalStage position(@NotNull PagePosition position) { + this.position = Objects.requireNonNull(position, "position must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeOpPagesReorder build() { + return new ChangeOpPagesReorder(pages, position, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/ChangeOpPagesRotate.java b/src/main/java/api/types/ChangeOpPagesRotate.java new file mode 100644 index 0000000..27b4269 --- /dev/null +++ b/src/main/java/api/types/ChangeOpPagesRotate.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ChangeOpPagesRotate.Builder.class) +public final class ChangeOpPagesRotate { + private final List pages; + + private final double rotation; + + private final Map additionalProperties; + + private ChangeOpPagesRotate(List pages, double rotation, Map additionalProperties) { + this.pages = pages; + this.rotation = rotation; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pages") + public List getPages() { + return pages; + } + + @JsonProperty("rotation") + public double getRotation() { + return rotation; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ChangeOpPagesRotate && equalTo((ChangeOpPagesRotate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ChangeOpPagesRotate other) { + return pages.equals(other.pages) && rotation == other.rotation; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pages, this.rotation); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RotationStage builder() { + return new Builder(); + } + + public interface RotationStage { + _FinalStage rotation(double rotation); + + Builder from(ChangeOpPagesRotate other); + } + + public interface _FinalStage { + ChangeOpPagesRotate build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage pages(List pages); + + _FinalStage addPages(PageRef pages); + + _FinalStage addAllPages(List pages); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RotationStage, _FinalStage { + private double rotation; + + private List pages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ChangeOpPagesRotate other) { + pages(other.getPages()); + rotation(other.getRotation()); + return this; + } + + @java.lang.Override + @JsonSetter("rotation") + public _FinalStage rotation(double rotation) { + this.rotation = rotation; + return this; + } + + @java.lang.Override + public _FinalStage addAllPages(List pages) { + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public _FinalStage addPages(PageRef pages) { + this.pages.add(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(List pages) { + this.pages.clear(); + if (pages != null) { + this.pages.addAll(pages); + } + return this; + } + + @java.lang.Override + public ChangeOpPagesRotate build() { + return new ChangeOpPagesRotate(pages, rotation, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocManifest200Response.java b/src/main/java/api/types/DocManifest200Response.java index e6612bd..71882a7 100644 --- a/src/main/java/api/types/DocManifest200Response.java +++ b/src/main/java/api/types/DocManifest200Response.java @@ -40,6 +40,8 @@ public final class DocManifest200Response { private final Optional formsVersion; + private final Optional outlineVersion; + private final int auditHead; private final String baseSha; @@ -66,6 +68,7 @@ private DocManifest200Response( Optional attachmentsVersion, Optional annotationsVersion, Optional formsVersion, + Optional outlineVersion, int auditHead, String baseSha, Optional layerVersion, @@ -82,6 +85,7 @@ private DocManifest200Response( this.attachmentsVersion = attachmentsVersion; this.annotationsVersion = annotationsVersion; this.formsVersion = formsVersion; + this.outlineVersion = outlineVersion; this.auditHead = auditHead; this.baseSha = baseSha; this.layerVersion = layerVersion; @@ -128,6 +132,11 @@ public Optional getFormsVersion() { return formsVersion; } + @JsonProperty("outlineVersion") + public Optional getOutlineVersion() { + return outlineVersion; + } + @JsonProperty("auditHead") public int getAuditHead() { return auditHead; @@ -196,6 +205,7 @@ private boolean equalTo(DocManifest200Response other) { && attachmentsVersion.equals(other.attachmentsVersion) && annotationsVersion.equals(other.annotationsVersion) && formsVersion.equals(other.formsVersion) + && outlineVersion.equals(other.outlineVersion) && auditHead == other.auditHead && baseSha.equals(other.baseSha) && layerVersion.equals(other.layerVersion) @@ -216,6 +226,7 @@ public int hashCode() { this.attachmentsVersion, this.annotationsVersion, this.formsVersion, + this.outlineVersion, this.auditHead, this.baseSha, this.layerVersion, @@ -280,6 +291,10 @@ public interface _FinalStage { _FinalStage formsVersion(Integer formsVersion); + _FinalStage outlineVersion(Optional outlineVersion); + + _FinalStage outlineVersion(Integer outlineVersion); + _FinalStage layerVersion(Optional layerVersion); _FinalStage layerVersion(Integer layerVersion); @@ -339,6 +354,8 @@ public static final class Builder private Optional layerVersion = Optional.empty(); + private Optional outlineVersion = Optional.empty(); + private Optional formsVersion = Optional.empty(); private Optional annotationsVersion = Optional.empty(); @@ -361,6 +378,7 @@ public Builder from(DocManifest200Response other) { attachmentsVersion(other.getAttachmentsVersion()); annotationsVersion(other.getAnnotationsVersion()); formsVersion(other.getFormsVersion()); + outlineVersion(other.getOutlineVersion()); auditHead(other.getAuditHead()); baseSha(other.getBaseSha()); layerVersion(other.getLayerVersion()); @@ -508,6 +526,19 @@ public _FinalStage layerVersion(Optional layerVersion) { return this; } + @java.lang.Override + public _FinalStage outlineVersion(Integer outlineVersion) { + this.outlineVersion = Optional.ofNullable(outlineVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "outlineVersion", nulls = Nulls.SKIP) + public _FinalStage outlineVersion(Optional outlineVersion) { + this.outlineVersion = outlineVersion; + return this; + } + @java.lang.Override public _FinalStage formsVersion(Integer formsVersion) { this.formsVersion = Optional.ofNullable(formsVersion); @@ -570,6 +601,7 @@ public DocManifest200Response build() { attachmentsVersion, annotationsVersion, formsVersion, + outlineVersion, auditHead, baseSha, layerVersion, diff --git a/src/main/java/api/types/DocManifest200ResponseScopes.java b/src/main/java/api/types/DocManifest200ResponseScopes.java index 5ca9c07..c38d507 100644 --- a/src/main/java/api/types/DocManifest200ResponseScopes.java +++ b/src/main/java/api/types/DocManifest200ResponseScopes.java @@ -33,6 +33,8 @@ public final class DocManifest200ResponseScopes { private final DocManifest200ResponseScopesActions actions; + private final DocManifest200ResponseScopesOutline outline; + private final Map additionalProperties; private DocManifest200ResponseScopes( @@ -43,6 +45,7 @@ private DocManifest200ResponseScopes( DocManifest200ResponseScopesAttachments attachments, DocManifest200ResponseScopesMetadata metadata, DocManifest200ResponseScopesActions actions, + DocManifest200ResponseScopesOutline outline, Map additionalProperties) { this.content = content; this.annotations = annotations; @@ -51,6 +54,7 @@ private DocManifest200ResponseScopes( this.attachments = attachments; this.metadata = metadata; this.actions = actions; + this.outline = outline; this.additionalProperties = additionalProperties; } @@ -89,6 +93,11 @@ public DocManifest200ResponseScopesActions getActions() { return actions; } + @JsonProperty("outline") + public DocManifest200ResponseScopesOutline getOutline() { + return outline; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -107,13 +116,21 @@ private boolean equalTo(DocManifest200ResponseScopes other) { && layout.equals(other.layout) && attachments.equals(other.attachments) && metadata.equals(other.metadata) - && actions.equals(other.actions); + && actions.equals(other.actions) + && outline.equals(other.outline); } @java.lang.Override public int hashCode() { return Objects.hash( - this.content, this.annotations, this.forms, this.layout, this.attachments, this.metadata, this.actions); + this.content, + this.annotations, + this.forms, + this.layout, + this.attachments, + this.metadata, + this.actions, + this.outline); } @java.lang.Override @@ -152,7 +169,11 @@ public interface MetadataStage { } public interface ActionsStage { - _FinalStage actions(@NotNull DocManifest200ResponseScopesActions actions); + OutlineStage actions(@NotNull DocManifest200ResponseScopesActions actions); + } + + public interface OutlineStage { + _FinalStage outline(@NotNull DocManifest200ResponseScopesOutline outline); } public interface _FinalStage { @@ -172,6 +193,7 @@ public static final class Builder AttachmentsStage, MetadataStage, ActionsStage, + OutlineStage, _FinalStage { private DocManifest200ResponseScopesContent content; @@ -187,6 +209,8 @@ public static final class Builder private DocManifest200ResponseScopesActions actions; + private DocManifest200ResponseScopesOutline outline; + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -201,6 +225,7 @@ public Builder from(DocManifest200ResponseScopes other) { attachments(other.getAttachments()); metadata(other.getMetadata()); actions(other.getActions()); + outline(other.getOutline()); return this; } @@ -248,15 +273,22 @@ public ActionsStage metadata(@NotNull DocManifest200ResponseScopesMetadata metad @java.lang.Override @JsonSetter("actions") - public _FinalStage actions(@NotNull DocManifest200ResponseScopesActions actions) { + public OutlineStage actions(@NotNull DocManifest200ResponseScopesActions actions) { this.actions = Objects.requireNonNull(actions, "actions must not be null"); return this; } + @java.lang.Override + @JsonSetter("outline") + public _FinalStage outline(@NotNull DocManifest200ResponseScopesOutline outline) { + this.outline = Objects.requireNonNull(outline, "outline must not be null"); + return this; + } + @java.lang.Override public DocManifest200ResponseScopes build() { return new DocManifest200ResponseScopes( - content, annotations, forms, layout, attachments, metadata, actions, additionalProperties); + content, annotations, forms, layout, attachments, metadata, actions, outline, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/DocManifest200ResponseScopesOutline.java b/src/main/java/api/types/DocManifest200ResponseScopesOutline.java new file mode 100644 index 0000000..a6b74c8 --- /dev/null +++ b/src/main/java/api/types/DocManifest200ResponseScopesOutline.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class DocManifest200ResponseScopesOutline { + public static final DocManifest200ResponseScopesOutline BASE = + new DocManifest200ResponseScopesOutline(Value.BASE, "base"); + + public static final DocManifest200ResponseScopesOutline LAYER = + new DocManifest200ResponseScopesOutline(Value.LAYER, "layer"); + + private final Value value; + + private final String string; + + DocManifest200ResponseScopesOutline(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof DocManifest200ResponseScopesOutline + && this.string.equals(((DocManifest200ResponseScopesOutline) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BASE: + return visitor.visitBase(); + case LAYER: + return visitor.visitLayer(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static DocManifest200ResponseScopesOutline valueOf(String value) { + switch (value) { + case "base": + return BASE; + case "layer": + return LAYER; + default: + return new DocManifest200ResponseScopesOutline(Value.UNKNOWN, value); + } + } + + public enum Value { + BASE, + + LAYER, + + UNKNOWN + } + + public interface Visitor { + T visitBase(); + + T visitLayer(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesBleed.java deleted file mode 100644 index 023f799..0000000 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesBleed.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxesBleed.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxesBleed { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesDelete200ResponseLayoutPagesItemBoxesBleed( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxesBleed - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxesBleed) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxesBleed other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesBleed other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxesBleed build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesBleed other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxesBleed build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesMedia.java deleted file mode 100644 index b48dd43..0000000 --- a/src/main/java/api/types/DocPagesDelete200ResponseLayoutPagesItemBoxesMedia.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesDelete200ResponseLayoutPagesItemBoxesMedia.Builder.class) -public final class DocPagesDelete200ResponseLayoutPagesItemBoxesMedia { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesDelete200ResponseLayoutPagesItemBoxesMedia( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesDelete200ResponseLayoutPagesItemBoxesMedia - && equalTo((DocPagesDelete200ResponseLayoutPagesItemBoxesMedia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesDelete200ResponseLayoutPagesItemBoxesMedia other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesMedia other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesDelete200ResponseLayoutPagesItemBoxesMedia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesDelete200ResponseLayoutPagesItemBoxesMedia other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesDelete200ResponseLayoutPagesItemBoxesMedia build() { - return new DocPagesDelete200ResponseLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesBleed.java deleted file mode 100644 index 07f8588..0000000 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesBleed.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxesBleed.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxesBleed { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsert200ResponseLayoutPagesItemBoxesBleed( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxesBleed - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxesBleed) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxesBleed other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesBleed other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxesBleed build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesBleed other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxesBleed build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesCrop.java deleted file mode 100644 index a012da5..0000000 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesCrop.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxesCrop.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxesCrop { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsert200ResponseLayoutPagesItemBoxesCrop( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxesCrop - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxesCrop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxesCrop other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesCrop other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxesCrop build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesCrop other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxesCrop build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesMedia.java deleted file mode 100644 index 14e6701..0000000 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesMedia.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxesMedia.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxesMedia { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsert200ResponseLayoutPagesItemBoxesMedia( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxesMedia - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxesMedia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxesMedia other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesMedia other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxesMedia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesMedia other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxesMedia build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesTrim.java deleted file mode 100644 index 8d84495..0000000 --- a/src/main/java/api/types/DocPagesInsert200ResponseLayoutPagesItemBoxesTrim.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsert200ResponseLayoutPagesItemBoxesTrim.Builder.class) -public final class DocPagesInsert200ResponseLayoutPagesItemBoxesTrim { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsert200ResponseLayoutPagesItemBoxesTrim( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsert200ResponseLayoutPagesItemBoxesTrim - && equalTo((DocPagesInsert200ResponseLayoutPagesItemBoxesTrim) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsert200ResponseLayoutPagesItemBoxesTrim other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesTrim other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsert200ResponseLayoutPagesItemBoxesTrim build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsert200ResponseLayoutPagesItemBoxesTrim other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsert200ResponseLayoutPagesItemBoxesTrim build() { - return new DocPagesInsert200ResponseLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayout.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayout.java deleted file mode 100644 index 5234189..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayout.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayout.Builder.class) -public final class DocPagesInsertBlank200ResponseLayout { - private final int pageCount; - - private final List pages; - - private final List namedPages; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayout( - int pageCount, - List pages, - List namedPages, - Map additionalProperties) { - this.pageCount = pageCount; - this.pages = pages; - this.namedPages = namedPages; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pageCount") - public int getPageCount() { - return pageCount; - } - - @JsonProperty("pages") - public List getPages() { - return pages; - } - - @JsonProperty("namedPages") - public List getNamedPages() { - return namedPages; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayout - && equalTo((DocPagesInsertBlank200ResponseLayout) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayout other) { - return pageCount == other.pageCount && pages.equals(other.pages) && namedPages.equals(other.namedPages); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.pageCount, this.pages, this.namedPages); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PageCountStage builder() { - return new Builder(); - } - - public interface PageCountStage { - _FinalStage pageCount(int pageCount); - - Builder from(DocPagesInsertBlank200ResponseLayout other); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayout build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage pages(List pages); - - _FinalStage addPages(DocPagesInsertBlank200ResponseLayoutPagesItem pages); - - _FinalStage addAllPages(List pages); - - _FinalStage namedPages(List namedPages); - - _FinalStage addNamedPages(DocPagesInsertBlank200ResponseLayoutNamedPagesItem namedPages); - - _FinalStage addAllNamedPages(List namedPages); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PageCountStage, _FinalStage { - private int pageCount; - - private List namedPages = new ArrayList<>(); - - private List pages = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayout other) { - pageCount(other.getPageCount()); - pages(other.getPages()); - namedPages(other.getNamedPages()); - return this; - } - - @java.lang.Override - @JsonSetter("pageCount") - public _FinalStage pageCount(int pageCount) { - this.pageCount = pageCount; - return this; - } - - @java.lang.Override - public _FinalStage addAllNamedPages(List namedPages) { - if (namedPages != null) { - this.namedPages.addAll(namedPages); - } - return this; - } - - @java.lang.Override - public _FinalStage addNamedPages(DocPagesInsertBlank200ResponseLayoutNamedPagesItem namedPages) { - this.namedPages.add(namedPages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "namedPages", nulls = Nulls.SKIP) - public _FinalStage namedPages(List namedPages) { - this.namedPages.clear(); - if (namedPages != null) { - this.namedPages.addAll(namedPages); - } - return this; - } - - @java.lang.Override - public _FinalStage addAllPages(List pages) { - if (pages != null) { - this.pages.addAll(pages); - } - return this; - } - - @java.lang.Override - public _FinalStage addPages(DocPagesInsertBlank200ResponseLayoutPagesItem pages) { - this.pages.add(pages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pages", nulls = Nulls.SKIP) - public _FinalStage pages(List pages) { - this.pages.clear(); - if (pages != null) { - this.pages.addAll(pages); - } - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayout build() { - return new DocPagesInsertBlank200ResponseLayout(pageCount, pages, namedPages, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.java deleted file mode 100644 index 5681d23..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget page( - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage value) { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget(new PageValue(value)); - } - - public static DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget template( - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate value) { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget(new TemplateValue(value)); - } - - public static DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget dangling( - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling value) { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget(new DanglingValue(value)); - } - - public boolean isPage() { - return value instanceof PageValue; - } - - public boolean isTemplate() { - return value instanceof TemplateValue; - } - - public boolean isDangling() { - return value instanceof DanglingValue; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getPage() { - if (isPage()) { - return Optional.of(((PageValue) value).value); - } - return Optional.empty(); - } - - public Optional getTemplate() { - if (isTemplate()) { - return Optional.of(((TemplateValue) value).value); - } - return Optional.empty(); - } - - public Optional getDangling() { - if (isDangling()) { - return Optional.of(((DanglingValue) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget - && value.equals(((DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget) other).value); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public String toString() { - return value.toString(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitPage(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage page); - - T visitTemplate(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate template); - - T visitDangling(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling dangling); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({ - @JsonSubTypes.Type(PageValue.class), - @JsonSubTypes.Type(TemplateValue.class), - @JsonSubTypes.Type(DanglingValue.class) - }) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("page") - @JsonIgnoreProperties("kind") - private static final class PageValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private PageValue() {} - - private PageValue(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetPage value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitPage(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PageValue && equalTo((PageValue) other); - } - - private boolean equalTo(PageValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; - } - } - - @JsonTypeName("template") - @JsonIgnoreProperties("kind") - private static final class TemplateValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private TemplateValue() {} - - private TemplateValue(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitTemplate(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TemplateValue && equalTo((TemplateValue) other); - } - - private boolean equalTo(TemplateValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; - } - } - - @JsonTypeName("dangling") - @JsonIgnoreProperties("kind") - private static final class DanglingValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "kind", allowSetters = true) - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private DanglingValue() {} - - private DanglingValue(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitDangling(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DanglingValue && equalTo((DanglingValue) other); - } - - private boolean equalTo(DanglingValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget{" + "value: " + value + "}"; - } - } - - @JsonIgnoreProperties("kind") - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget{" + "type: " + type + ", value: " + value - + "}"; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling.java deleted file mode 100644 index 0e813c6..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling { - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling other) { - return this; - } - - public DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling build() { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetDangling(additionalProperties); - } - - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItem.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItem.java deleted file mode 100644 index ef14a78..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItem.java +++ /dev/null @@ -1,435 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.Nullable; -import com.cloudpdf.api.core.NullableNonemptyFilter; -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItem.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItem { - private final int index; - - private final PageRef ref; - - private final Optional label; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemSize size; - - private final double rotation; - - private final double userUnit; - - private final Optional tabOrder; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxes boxes; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox pdfCropBox; - - private final Optional actions; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItem( - int index, - PageRef ref, - Optional label, - DocPagesInsertBlank200ResponseLayoutPagesItemSize size, - double rotation, - double userUnit, - Optional tabOrder, - DocPagesInsertBlank200ResponseLayoutPagesItemBoxes boxes, - DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox pdfCropBox, - Optional actions, - Map additionalProperties) { - this.index = index; - this.ref = ref; - this.label = label; - this.size = size; - this.rotation = rotation; - this.userUnit = userUnit; - this.tabOrder = tabOrder; - this.boxes = boxes; - this.pdfCropBox = pdfCropBox; - this.actions = actions; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("index") - public int getIndex() { - return index; - } - - @JsonProperty("ref") - public PageRef getRef() { - return ref; - } - - @JsonIgnore - public Optional getLabel() { - if (label == null) { - return Optional.empty(); - } - return label; - } - - @JsonProperty("size") - public DocPagesInsertBlank200ResponseLayoutPagesItemSize getSize() { - return size; - } - - @JsonProperty("rotation") - public double getRotation() { - return rotation; - } - - @JsonProperty("userUnit") - public double getUserUnit() { - return userUnit; - } - - @JsonIgnore - public Optional getTabOrder() { - if (tabOrder == null) { - return Optional.empty(); - } - return tabOrder; - } - - @JsonProperty("boxes") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxes getBoxes() { - return boxes; - } - - @JsonProperty("pdfCropBox") - public DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox getPdfCropBox() { - return pdfCropBox; - } - - @JsonProperty("actions") - public Optional getActions() { - return actions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("label") - private Optional _getLabel() { - return label; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("tabOrder") - private Optional _getTabOrder() { - return tabOrder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItem - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItem other) { - return index == other.index - && ref.equals(other.ref) - && label.equals(other.label) - && size.equals(other.size) - && rotation == other.rotation - && userUnit == other.userUnit - && tabOrder.equals(other.tabOrder) - && boxes.equals(other.boxes) - && pdfCropBox.equals(other.pdfCropBox) - && actions.equals(other.actions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.index, - this.ref, - this.label, - this.size, - this.rotation, - this.userUnit, - this.tabOrder, - this.boxes, - this.pdfCropBox, - this.actions); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IndexStage builder() { - return new Builder(); - } - - public interface IndexStage { - RefStage index(int index); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItem other); - } - - public interface RefStage { - SizeStage ref(@NotNull PageRef ref); - } - - public interface SizeStage { - RotationStage size(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemSize size); - } - - public interface RotationStage { - UserUnitStage rotation(double rotation); - } - - public interface UserUnitStage { - BoxesStage userUnit(double userUnit); - } - - public interface BoxesStage { - PdfCropBoxStage boxes(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxes boxes); - } - - public interface PdfCropBoxStage { - _FinalStage pdfCropBox(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox pdfCropBox); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItem build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage label(Nullable label); - - _FinalStage tabOrder(Optional tabOrder); - - _FinalStage tabOrder(DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder tabOrder); - - _FinalStage tabOrder(Nullable tabOrder); - - _FinalStage actions(Optional actions); - - _FinalStage actions(PdfPageActions actions); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IndexStage, - RefStage, - SizeStage, - RotationStage, - UserUnitStage, - BoxesStage, - PdfCropBoxStage, - _FinalStage { - private int index; - - private PageRef ref; - - private DocPagesInsertBlank200ResponseLayoutPagesItemSize size; - - private double rotation; - - private double userUnit; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxes boxes; - - private DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox pdfCropBox; - - private Optional actions = Optional.empty(); - - private Optional tabOrder = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItem other) { - index(other.getIndex()); - ref(other.getRef()); - label(other.getLabel()); - size(other.getSize()); - rotation(other.getRotation()); - userUnit(other.getUserUnit()); - tabOrder(other.getTabOrder()); - boxes(other.getBoxes()); - pdfCropBox(other.getPdfCropBox()); - actions(other.getActions()); - return this; - } - - @java.lang.Override - @JsonSetter("index") - public RefStage index(int index) { - this.index = index; - return this; - } - - @java.lang.Override - @JsonSetter("ref") - public SizeStage ref(@NotNull PageRef ref) { - this.ref = Objects.requireNonNull(ref, "ref must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("size") - public RotationStage size(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemSize size) { - this.size = Objects.requireNonNull(size, "size must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("rotation") - public UserUnitStage rotation(double rotation) { - this.rotation = rotation; - return this; - } - - @java.lang.Override - @JsonSetter("userUnit") - public BoxesStage userUnit(double userUnit) { - this.userUnit = userUnit; - return this; - } - - @java.lang.Override - @JsonSetter("boxes") - public PdfCropBoxStage boxes(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxes boxes) { - this.boxes = Objects.requireNonNull(boxes, "boxes must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("pdfCropBox") - public _FinalStage pdfCropBox(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox pdfCropBox) { - this.pdfCropBox = Objects.requireNonNull(pdfCropBox, "pdfCropBox must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage actions(PdfPageActions actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public _FinalStage actions(Optional actions) { - this.actions = actions; - return this; - } - - @java.lang.Override - public _FinalStage tabOrder(Nullable tabOrder) { - if (tabOrder.isNull()) { - this.tabOrder = null; - } else if (tabOrder.isEmpty()) { - this.tabOrder = Optional.empty(); - } else { - this.tabOrder = Optional.of(tabOrder.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage tabOrder(DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder tabOrder) { - this.tabOrder = Optional.ofNullable(tabOrder); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tabOrder", nulls = Nulls.SKIP) - public _FinalStage tabOrder(Optional tabOrder) { - this.tabOrder = tabOrder; - return this; - } - - @java.lang.Override - public _FinalStage label(Nullable label) { - if (label.isNull()) { - this.label = null; - } else if (label.isEmpty()) { - this.label = Optional.empty(); - } else { - this.label = Optional.of(label.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItem build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItem( - index, - ref, - label, - size, - rotation, - userUnit, - tabOrder, - boxes, - pdfCropBox, - actions, - additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxes.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxes.java deleted file mode 100644 index 7f942f1..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxes.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxes.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxes { - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia media; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop crop; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed bleed; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim trim; - - private final DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt art; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxes( - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia media, - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop crop, - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed bleed, - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim trim, - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt art, - Map additionalProperties) { - this.media = media; - this.crop = crop; - this.bleed = bleed; - this.trim = trim; - this.art = art; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("media") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia getMedia() { - return media; - } - - @JsonProperty("crop") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop getCrop() { - return crop; - } - - @JsonProperty("bleed") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed getBleed() { - return bleed; - } - - @JsonProperty("trim") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim getTrim() { - return trim; - } - - @JsonProperty("art") - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt getArt() { - return art; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxes - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxes) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxes other) { - return media.equals(other.media) - && crop.equals(other.crop) - && bleed.equals(other.bleed) - && trim.equals(other.trim) - && art.equals(other.art); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.media, this.crop, this.bleed, this.trim, this.art); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MediaStage builder() { - return new Builder(); - } - - public interface MediaStage { - CropStage media(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia media); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxes other); - } - - public interface CropStage { - BleedStage crop(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop crop); - } - - public interface BleedStage { - TrimStage bleed(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed bleed); - } - - public interface TrimStage { - ArtStage trim(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim trim); - } - - public interface ArtStage { - _FinalStage art(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt art); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxes build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MediaStage, CropStage, BleedStage, TrimStage, ArtStage, _FinalStage { - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia media; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop crop; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed bleed; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim trim; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt art; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxes other) { - media(other.getMedia()); - crop(other.getCrop()); - bleed(other.getBleed()); - trim(other.getTrim()); - art(other.getArt()); - return this; - } - - @java.lang.Override - @JsonSetter("media") - public CropStage media(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia media) { - this.media = Objects.requireNonNull(media, "media must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("crop") - public BleedStage crop(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop crop) { - this.crop = Objects.requireNonNull(crop, "crop must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bleed") - public TrimStage bleed(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed bleed) { - this.bleed = Objects.requireNonNull(bleed, "bleed must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("trim") - public ArtStage trim(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim trim) { - this.trim = Objects.requireNonNull(trim, "trim must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("art") - public _FinalStage art(@NotNull DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt art) { - this.art = Objects.requireNonNull(art, "art must not be null"); - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxes build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxes( - media, crop, bleed, trim, art, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt.java deleted file mode 100644 index d8b8466..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxesArt(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed.java deleted file mode 100644 index baa290b..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxesBleed( - x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop.java deleted file mode 100644 index 8954731..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxesCrop( - x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia.java deleted file mode 100644 index b322bd9..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxesMedia( - x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim.java deleted file mode 100644 index 5aa74b9..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemBoxesTrim( - x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox.java deleted file mode 100644 index df72bd1..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox { - private final double left; - - private final double bottom; - - private final double right; - - private final double top; - - private final Map additionalProperties; - - private DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox( - double left, double bottom, double right, double top, Map additionalProperties) { - this.left = left; - this.bottom = bottom; - this.right = right; - this.top = top; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("left") - public double getLeft() { - return left; - } - - @JsonProperty("bottom") - public double getBottom() { - return bottom; - } - - @JsonProperty("right") - public double getRight() { - return right; - } - - @JsonProperty("top") - public double getTop() { - return top; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox - && equalTo((DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox other) { - return left == other.left && bottom == other.bottom && right == other.right && top == other.top; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.left, this.bottom, this.right, this.top); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static LeftStage builder() { - return new Builder(); - } - - public interface LeftStage { - BottomStage left(double left); - - Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox other); - } - - public interface BottomStage { - RightStage bottom(double bottom); - } - - public interface RightStage { - TopStage right(double right); - } - - public interface TopStage { - _FinalStage top(double top); - } - - public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements LeftStage, BottomStage, RightStage, TopStage, _FinalStage { - private double left; - - private double bottom; - - private double right; - - private double top; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox other) { - left(other.getLeft()); - bottom(other.getBottom()); - right(other.getRight()); - top(other.getTop()); - return this; - } - - @java.lang.Override - @JsonSetter("left") - public BottomStage left(double left) { - this.left = left; - return this; - } - - @java.lang.Override - @JsonSetter("bottom") - public RightStage bottom(double bottom) { - this.bottom = bottom; - return this; - } - - @java.lang.Override - @JsonSetter("right") - public TopStage right(double right) { - this.right = right; - return this; - } - - @java.lang.Override - @JsonSetter("top") - public _FinalStage top(double top) { - this.top = top; - return this; - } - - @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox build() { - return new DocPagesInsertBlank200ResponseLayoutPagesItemPdfCropBox( - left, bottom, right, top, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder.java b/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder.java deleted file mode 100644 index 77c0b18..0000000 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder { - public static final DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder WIDGETS = - new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.WIDGETS, "widgets"); - - public static final DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder COLUMNS = - new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.COLUMNS, "columns"); - - public static final DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder ANNOTATIONS = - new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.ANNOTATIONS, "annotations"); - - public static final DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder ROWS = - new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.ROWS, "rows"); - - public static final DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder STRUCTURE = - new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.STRUCTURE, "structure"); - - private final Value value; - - private final String string; - - DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder - && this.string.equals(((DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WIDGETS: - return visitor.visitWidgets(); - case COLUMNS: - return visitor.visitColumns(); - case ANNOTATIONS: - return visitor.visitAnnotations(); - case ROWS: - return visitor.visitRows(); - case STRUCTURE: - return visitor.visitStructure(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder valueOf(String value) { - switch (value) { - case "widgets": - return WIDGETS; - case "columns": - return COLUMNS; - case "annotations": - return ANNOTATIONS; - case "rows": - return ROWS; - case "structure": - return STRUCTURE; - default: - return new DocPagesInsertBlank200ResponseLayoutPagesItemTabOrder(Value.UNKNOWN, value); - } - } - - public enum Value { - ROWS, - - COLUMNS, - - STRUCTURE, - - ANNOTATIONS, - - WIDGETS, - - UNKNOWN - } - - public interface Visitor { - T visitRows(); - - T visitColumns(); - - T visitStructure(); - - T visitAnnotations(); - - T visitWidgets(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesBleed.java b/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesBleed.java deleted file mode 100644 index b012ed8..0000000 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesBleed.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxesBleed.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxesBleed { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesRotate200ResponseLayoutPagesItemBoxesBleed( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxesBleed - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxesBleed) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxesBleed other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesBleed other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxesBleed build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesBleed other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxesBleed build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxesBleed(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesCrop.java b/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesCrop.java deleted file mode 100644 index 29b43c4..0000000 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesCrop.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxesCrop.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxesCrop { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesRotate200ResponseLayoutPagesItemBoxesCrop( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxesCrop - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxesCrop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxesCrop other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesCrop other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxesCrop build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesCrop other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxesCrop build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxesCrop(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesMedia.java b/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesMedia.java deleted file mode 100644 index d01187f..0000000 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesMedia.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxesMedia.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxesMedia { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesRotate200ResponseLayoutPagesItemBoxesMedia( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxesMedia - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxesMedia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxesMedia other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesMedia other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxesMedia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesMedia other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxesMedia build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxesMedia(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesTrim.java b/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesTrim.java deleted file mode 100644 index d574881..0000000 --- a/src/main/java/api/types/DocPagesRotate200ResponseLayoutPagesItemBoxesTrim.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.cloudpdf.api.types; - -import com.cloudpdf.api.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesRotate200ResponseLayoutPagesItemBoxesTrim.Builder.class) -public final class DocPagesRotate200ResponseLayoutPagesItemBoxesTrim { - private final double x; - - private final double y; - - private final double width; - - private final double height; - - private final Map additionalProperties; - - private DocPagesRotate200ResponseLayoutPagesItemBoxesTrim( - double x, double y, double width, double height, Map additionalProperties) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public double getX() { - return x; - } - - @JsonProperty("y") - public double getY() { - return y; - } - - @JsonProperty("width") - public double getWidth() { - return width; - } - - @JsonProperty("height") - public double getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DocPagesRotate200ResponseLayoutPagesItemBoxesTrim - && equalTo((DocPagesRotate200ResponseLayoutPagesItemBoxesTrim) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DocPagesRotate200ResponseLayoutPagesItemBoxesTrim other) { - return x == other.x && y == other.y && width == other.width && height == other.height; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y, this.width, this.height); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(double x); - - Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesTrim other); - } - - public interface YStage { - WidthStage y(double y); - } - - public interface WidthStage { - HeightStage width(double width); - } - - public interface HeightStage { - _FinalStage height(double height); - } - - public interface _FinalStage { - DocPagesRotate200ResponseLayoutPagesItemBoxesTrim build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, WidthStage, HeightStage, _FinalStage { - private double x; - - private double y; - - private double width; - - private double height; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DocPagesRotate200ResponseLayoutPagesItemBoxesTrim other) { - x(other.getX()); - y(other.getY()); - width(other.getWidth()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(double x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public WidthStage y(double y) { - this.y = y; - return this; - } - - @java.lang.Override - @JsonSetter("width") - public HeightStage width(double width) { - this.width = width; - return this; - } - - @java.lang.Override - @JsonSetter("height") - public _FinalStage height(double height) { - this.height = height; - return this; - } - - @java.lang.Override - public DocPagesRotate200ResponseLayoutPagesItemBoxesTrim build() { - return new DocPagesRotate200ResponseLayoutPagesItemBoxesTrim(x, y, width, height, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/api/types/DocumentOutline.java b/src/main/java/api/types/DocumentOutline.java new file mode 100644 index 0000000..8b1984a --- /dev/null +++ b/src/main/java/api/types/DocumentOutline.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = DocumentOutline.Builder.class) +public final class DocumentOutline { + private final List items; + + private final boolean incomplete; + + private final Map additionalProperties; + + private DocumentOutline(List items, boolean incomplete, Map additionalProperties) { + this.items = items; + this.incomplete = incomplete; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("items") + public List getItems() { + return items; + } + + @JsonProperty("incomplete") + public boolean getIncomplete() { + return incomplete; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DocumentOutline && equalTo((DocumentOutline) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(DocumentOutline other) { + return items.equals(other.items) && incomplete == other.incomplete; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.items, this.incomplete); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IncompleteStage builder() { + return new Builder(); + } + + public interface IncompleteStage { + _FinalStage incomplete(boolean incomplete); + + Builder from(DocumentOutline other); + } + + public interface _FinalStage { + DocumentOutline build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage items(List items); + + _FinalStage addItems(OutlineItem items); + + _FinalStage addAllItems(List items); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IncompleteStage, _FinalStage { + private boolean incomplete; + + private List items = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(DocumentOutline other) { + items(other.getItems()); + incomplete(other.getIncomplete()); + return this; + } + + @java.lang.Override + @JsonSetter("incomplete") + public _FinalStage incomplete(boolean incomplete) { + this.incomplete = incomplete; + return this; + } + + @java.lang.Override + public _FinalStage addAllItems(List items) { + if (items != null) { + this.items.addAll(items); + } + return this; + } + + @java.lang.Override + public _FinalStage addItems(OutlineItem items) { + this.items.add(items); + return this; + } + + @java.lang.Override + @JsonSetter(value = "items", nulls = Nulls.SKIP) + public _FinalStage items(List items) { + this.items.clear(); + if (items != null) { + this.items.addAll(items); + } + return this; + } + + @java.lang.Override + public DocumentOutline build() { + return new DocumentOutline(items, incomplete, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlineItem.java b/src/main/java/api/types/OutlineItem.java new file mode 100644 index 0000000..a1c1444 --- /dev/null +++ b/src/main/java/api/types/OutlineItem.java @@ -0,0 +1,442 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlineItem.Builder.class) +public final class OutlineItem { + private final OutlineItemRef ref; + + private final Optional parent; + + private final String title; + + private final Optional target; + + private final Optional action; + + private final boolean open; + + private final Optional color; + + private final boolean bold; + + private final boolean italic; + + private final Map additionalProperties; + + private OutlineItem( + OutlineItemRef ref, + Optional parent, + String title, + Optional target, + Optional action, + boolean open, + Optional color, + boolean bold, + boolean italic, + Map additionalProperties) { + this.ref = ref; + this.parent = parent; + this.title = title; + this.target = target; + this.action = action; + this.open = open; + this.color = color; + this.bold = bold; + this.italic = italic; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("ref") + public OutlineItemRef getRef() { + return ref; + } + + @JsonIgnore + public Optional getParent() { + if (parent == null) { + return Optional.empty(); + } + return parent; + } + + @JsonProperty("title") + public String getTitle() { + return title; + } + + @JsonIgnore + public Optional getTarget() { + if (target == null) { + return Optional.empty(); + } + return target; + } + + @JsonIgnore + public Optional getAction() { + if (action == null) { + return Optional.empty(); + } + return action; + } + + @JsonProperty("open") + public boolean getOpen() { + return open; + } + + @JsonIgnore + public Optional getColor() { + if (color == null) { + return Optional.empty(); + } + return color; + } + + @JsonProperty("bold") + public boolean getBold() { + return bold; + } + + @JsonProperty("italic") + public boolean getItalic() { + return italic; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parent") + private Optional _getParent() { + return parent; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("target") + private Optional _getTarget() { + return target; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("action") + private Optional _getAction() { + return action; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("color") + private Optional _getColor() { + return color; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineItem && equalTo((OutlineItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlineItem other) { + return ref.equals(other.ref) + && parent.equals(other.parent) + && title.equals(other.title) + && target.equals(other.target) + && action.equals(other.action) + && open == other.open + && color.equals(other.color) + && bold == other.bold + && italic == other.italic; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.ref, + this.parent, + this.title, + this.target, + this.action, + this.open, + this.color, + this.bold, + this.italic); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RefStage builder() { + return new Builder(); + } + + public interface RefStage { + TitleStage ref(@NotNull OutlineItemRef ref); + + Builder from(OutlineItem other); + } + + public interface TitleStage { + OpenStage title(@NotNull String title); + } + + public interface OpenStage { + BoldStage open(boolean open); + } + + public interface BoldStage { + ItalicStage bold(boolean bold); + } + + public interface ItalicStage { + _FinalStage italic(boolean italic); + } + + public interface _FinalStage { + OutlineItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage parent(Optional parent); + + _FinalStage parent(OutlineItemRef parent); + + _FinalStage parent(Nullable parent); + + _FinalStage target(Optional target); + + _FinalStage target(PdfLinkTarget target); + + _FinalStage target(Nullable target); + + _FinalStage action(Optional action); + + _FinalStage action(PdfActionTree action); + + _FinalStage action(Nullable action); + + _FinalStage color(Optional color); + + _FinalStage color(String color); + + _FinalStage color(Nullable color); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RefStage, TitleStage, OpenStage, BoldStage, ItalicStage, _FinalStage { + private OutlineItemRef ref; + + private String title; + + private boolean open; + + private boolean bold; + + private boolean italic; + + private Optional color = Optional.empty(); + + private Optional action = Optional.empty(); + + private Optional target = Optional.empty(); + + private Optional parent = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OutlineItem other) { + ref(other.getRef()); + parent(other.getParent()); + title(other.getTitle()); + target(other.getTarget()); + action(other.getAction()); + open(other.getOpen()); + color(other.getColor()); + bold(other.getBold()); + italic(other.getItalic()); + return this; + } + + @java.lang.Override + @JsonSetter("ref") + public TitleStage ref(@NotNull OutlineItemRef ref) { + this.ref = Objects.requireNonNull(ref, "ref must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("title") + public OpenStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("open") + public BoldStage open(boolean open) { + this.open = open; + return this; + } + + @java.lang.Override + @JsonSetter("bold") + public ItalicStage bold(boolean bold) { + this.bold = bold; + return this; + } + + @java.lang.Override + @JsonSetter("italic") + public _FinalStage italic(boolean italic) { + this.italic = italic; + return this; + } + + @java.lang.Override + public _FinalStage color(Nullable color) { + if (color.isNull()) { + this.color = null; + } else if (color.isEmpty()) { + this.color = Optional.empty(); + } else { + this.color = Optional.of(color.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage color(String color) { + this.color = Optional.ofNullable(color); + return this; + } + + @java.lang.Override + @JsonSetter(value = "color", nulls = Nulls.SKIP) + public _FinalStage color(Optional color) { + this.color = color; + return this; + } + + @java.lang.Override + public _FinalStage action(Nullable action) { + if (action.isNull()) { + this.action = null; + } else if (action.isEmpty()) { + this.action = Optional.empty(); + } else { + this.action = Optional.of(action.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage action(PdfActionTree action) { + this.action = Optional.ofNullable(action); + return this; + } + + @java.lang.Override + @JsonSetter(value = "action", nulls = Nulls.SKIP) + public _FinalStage action(Optional action) { + this.action = action; + return this; + } + + @java.lang.Override + public _FinalStage target(Nullable target) { + if (target.isNull()) { + this.target = null; + } else if (target.isEmpty()) { + this.target = Optional.empty(); + } else { + this.target = Optional.of(target.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage target(PdfLinkTarget target) { + this.target = Optional.ofNullable(target); + return this; + } + + @java.lang.Override + @JsonSetter(value = "target", nulls = Nulls.SKIP) + public _FinalStage target(Optional target) { + this.target = target; + return this; + } + + @java.lang.Override + public _FinalStage parent(Nullable parent) { + if (parent.isNull()) { + this.parent = null; + } else if (parent.isEmpty()) { + this.parent = Optional.empty(); + } else { + this.parent = Optional.of(parent.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage parent(OutlineItemRef parent) { + this.parent = Optional.ofNullable(parent); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parent", nulls = Nulls.SKIP) + public _FinalStage parent(Optional parent) { + this.parent = parent; + return this; + } + + @java.lang.Override + public OutlineItem build() { + return new OutlineItem(ref, parent, title, target, action, open, color, bold, italic, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlineItemDraft.java b/src/main/java/api/types/OutlineItemDraft.java new file mode 100644 index 0000000..ce0b234 --- /dev/null +++ b/src/main/java/api/types/OutlineItemDraft.java @@ -0,0 +1,291 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlineItemDraft.Builder.class) +public final class OutlineItemDraft { + private final String title; + + private final Optional target; + + private final Optional color; + + private final Optional bold; + + private final Optional italic; + + private final Map additionalProperties; + + private OutlineItemDraft( + String title, + Optional target, + Optional color, + Optional bold, + Optional italic, + Map additionalProperties) { + this.title = title; + this.target = target; + this.color = color; + this.bold = bold; + this.italic = italic; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("title") + public String getTitle() { + return title; + } + + @JsonIgnore + public Optional getTarget() { + if (target == null) { + return Optional.empty(); + } + return target; + } + + @JsonIgnore + public Optional getColor() { + if (color == null) { + return Optional.empty(); + } + return color; + } + + @JsonProperty("bold") + public Optional getBold() { + return bold; + } + + @JsonProperty("italic") + public Optional getItalic() { + return italic; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("target") + private Optional _getTarget() { + return target; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("color") + private Optional _getColor() { + return color; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineItemDraft && equalTo((OutlineItemDraft) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlineItemDraft other) { + return title.equals(other.title) + && target.equals(other.target) + && color.equals(other.color) + && bold.equals(other.bold) + && italic.equals(other.italic); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.target, this.color, this.bold, this.italic); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TitleStage builder() { + return new Builder(); + } + + public interface TitleStage { + _FinalStage title(@NotNull String title); + + Builder from(OutlineItemDraft other); + } + + public interface _FinalStage { + OutlineItemDraft build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage target(Optional target); + + _FinalStage target(PdfLinkTargetWritable target); + + _FinalStage target(Nullable target); + + _FinalStage color(Optional color); + + _FinalStage color(String color); + + _FinalStage color(Nullable color); + + _FinalStage bold(Optional bold); + + _FinalStage bold(Boolean bold); + + _FinalStage italic(Optional italic); + + _FinalStage italic(Boolean italic); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TitleStage, _FinalStage { + private String title; + + private Optional italic = Optional.empty(); + + private Optional bold = Optional.empty(); + + private Optional color = Optional.empty(); + + private Optional target = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OutlineItemDraft other) { + title(other.getTitle()); + target(other.getTarget()); + color(other.getColor()); + bold(other.getBold()); + italic(other.getItalic()); + return this; + } + + @java.lang.Override + @JsonSetter("title") + public _FinalStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage italic(Boolean italic) { + this.italic = Optional.ofNullable(italic); + return this; + } + + @java.lang.Override + @JsonSetter(value = "italic", nulls = Nulls.SKIP) + public _FinalStage italic(Optional italic) { + this.italic = italic; + return this; + } + + @java.lang.Override + public _FinalStage bold(Boolean bold) { + this.bold = Optional.ofNullable(bold); + return this; + } + + @java.lang.Override + @JsonSetter(value = "bold", nulls = Nulls.SKIP) + public _FinalStage bold(Optional bold) { + this.bold = bold; + return this; + } + + @java.lang.Override + public _FinalStage color(Nullable color) { + if (color.isNull()) { + this.color = null; + } else if (color.isEmpty()) { + this.color = Optional.empty(); + } else { + this.color = Optional.of(color.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage color(String color) { + this.color = Optional.ofNullable(color); + return this; + } + + @java.lang.Override + @JsonSetter(value = "color", nulls = Nulls.SKIP) + public _FinalStage color(Optional color) { + this.color = color; + return this; + } + + @java.lang.Override + public _FinalStage target(Nullable target) { + if (target.isNull()) { + this.target = null; + } else if (target.isEmpty()) { + this.target = Optional.empty(); + } else { + this.target = Optional.of(target.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage target(PdfLinkTargetWritable target) { + this.target = Optional.ofNullable(target); + return this; + } + + @java.lang.Override + @JsonSetter(value = "target", nulls = Nulls.SKIP) + public _FinalStage target(Optional target) { + this.target = target; + return this; + } + + @java.lang.Override + public OutlineItemDraft build() { + return new OutlineItemDraft(title, target, color, bold, italic, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlineItemPatch.java b/src/main/java/api/types/OutlineItemPatch.java new file mode 100644 index 0000000..41d6bb3 --- /dev/null +++ b/src/main/java/api/types/OutlineItemPatch.java @@ -0,0 +1,270 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlineItemPatch.Builder.class) +public final class OutlineItemPatch { + private final Optional title; + + private final Optional target; + + private final Optional color; + + private final Optional bold; + + private final Optional italic; + + private final Optional open; + + private final Map additionalProperties; + + private OutlineItemPatch( + Optional title, + Optional target, + Optional color, + Optional bold, + Optional italic, + Optional open, + Map additionalProperties) { + this.title = title; + this.target = target; + this.color = color; + this.bold = bold; + this.italic = italic; + this.open = open; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("title") + public Optional getTitle() { + return title; + } + + @JsonIgnore + public Optional getTarget() { + if (target == null) { + return Optional.empty(); + } + return target; + } + + @JsonIgnore + public Optional getColor() { + if (color == null) { + return Optional.empty(); + } + return color; + } + + @JsonProperty("bold") + public Optional getBold() { + return bold; + } + + @JsonProperty("italic") + public Optional getItalic() { + return italic; + } + + @JsonProperty("open") + public Optional getOpen() { + return open; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("target") + private Optional _getTarget() { + return target; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("color") + private Optional _getColor() { + return color; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineItemPatch && equalTo((OutlineItemPatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlineItemPatch other) { + return title.equals(other.title) + && target.equals(other.target) + && color.equals(other.color) + && bold.equals(other.bold) + && italic.equals(other.italic) + && open.equals(other.open); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.target, this.color, this.bold, this.italic, this.open); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional title = Optional.empty(); + + private Optional target = Optional.empty(); + + private Optional color = Optional.empty(); + + private Optional bold = Optional.empty(); + + private Optional italic = Optional.empty(); + + private Optional open = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(OutlineItemPatch other) { + title(other.getTitle()); + target(other.getTarget()); + color(other.getColor()); + bold(other.getBold()); + italic(other.getItalic()); + open(other.getOpen()); + return this; + } + + @JsonSetter(value = "title", nulls = Nulls.SKIP) + public Builder title(Optional title) { + this.title = title; + return this; + } + + public Builder title(String title) { + this.title = Optional.ofNullable(title); + return this; + } + + @JsonSetter(value = "target", nulls = Nulls.SKIP) + public Builder target(Optional target) { + this.target = target; + return this; + } + + public Builder target(PdfLinkTargetWritable target) { + this.target = Optional.ofNullable(target); + return this; + } + + public Builder target(Nullable target) { + if (target.isNull()) { + this.target = null; + } else if (target.isEmpty()) { + this.target = Optional.empty(); + } else { + this.target = Optional.of(target.get()); + } + return this; + } + + @JsonSetter(value = "color", nulls = Nulls.SKIP) + public Builder color(Optional color) { + this.color = color; + return this; + } + + public Builder color(String color) { + this.color = Optional.ofNullable(color); + return this; + } + + public Builder color(Nullable color) { + if (color.isNull()) { + this.color = null; + } else if (color.isEmpty()) { + this.color = Optional.empty(); + } else { + this.color = Optional.of(color.get()); + } + return this; + } + + @JsonSetter(value = "bold", nulls = Nulls.SKIP) + public Builder bold(Optional bold) { + this.bold = bold; + return this; + } + + public Builder bold(Boolean bold) { + this.bold = Optional.ofNullable(bold); + return this; + } + + @JsonSetter(value = "italic", nulls = Nulls.SKIP) + public Builder italic(Optional italic) { + this.italic = italic; + return this; + } + + public Builder italic(Boolean italic) { + this.italic = Optional.ofNullable(italic); + return this; + } + + @JsonSetter(value = "open", nulls = Nulls.SKIP) + public Builder open(Optional open) { + this.open = open; + return this; + } + + public Builder open(Boolean open) { + this.open = Optional.ofNullable(open); + return this; + } + + public OutlineItemPatch build() { + return new OutlineItemPatch(title, target, color, bold, italic, open, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate.java b/src/main/java/api/types/OutlineItemRef.java similarity index 64% rename from src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate.java rename to src/main/java/api/types/OutlineItemRef.java index 8915103..a3d2065 100644 --- a/src/main/java/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate.java +++ b/src/main/java/api/types/OutlineItemRef.java @@ -14,20 +14,28 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate.Builder.class) -public final class DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate { +@JsonDeserialize(builder = OutlineItemRef.Builder.class) +public final class OutlineItemRef { + private final OutlineItemRefKind kind; + private final int objectNumber; private final Map additionalProperties; - private DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate( - int objectNumber, Map additionalProperties) { + private OutlineItemRef(OutlineItemRefKind kind, int objectNumber, Map additionalProperties) { + this.kind = kind; this.objectNumber = objectNumber; this.additionalProperties = additionalProperties; } + @JsonProperty("kind") + public OutlineItemRefKind getKind() { + return kind; + } + @JsonProperty("objectNumber") public int getObjectNumber() { return objectNumber; @@ -36,8 +44,7 @@ public int getObjectNumber() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate - && equalTo((DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate) other); + return other instanceof OutlineItemRef && equalTo((OutlineItemRef) other); } @JsonAnyGetter @@ -45,13 +52,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate other) { - return objectNumber == other.objectNumber; + private boolean equalTo(OutlineItemRef other) { + return kind.equals(other.kind) && objectNumber == other.objectNumber; } @java.lang.Override public int hashCode() { - return Objects.hash(this.objectNumber); + return Objects.hash(this.kind, this.objectNumber); } @java.lang.Override @@ -59,18 +66,22 @@ public String toString() { return ObjectMappers.stringify(this); } - public static ObjectNumberStage builder() { + public static KindStage builder() { return new Builder(); } + public interface KindStage { + ObjectNumberStage kind(@NotNull OutlineItemRefKind kind); + + Builder from(OutlineItemRef other); + } + public interface ObjectNumberStage { _FinalStage objectNumber(int objectNumber); - - Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate other); } public interface _FinalStage { - DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate build(); + OutlineItemRef build(); _FinalStage additionalProperty(String key, Object value); @@ -78,7 +89,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ObjectNumberStage, _FinalStage { + public static final class Builder implements KindStage, ObjectNumberStage, _FinalStage { + private OutlineItemRefKind kind; + private int objectNumber; @JsonAnySetter @@ -87,11 +100,19 @@ public static final class Builder implements ObjectNumberStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate other) { + public Builder from(OutlineItemRef other) { + kind(other.getKind()); objectNumber(other.getObjectNumber()); return this; } + @java.lang.Override + @JsonSetter("kind") + public ObjectNumberStage kind(@NotNull OutlineItemRefKind kind) { + this.kind = Objects.requireNonNull(kind, "kind must not be null"); + return this; + } + @java.lang.Override @JsonSetter("objectNumber") public _FinalStage objectNumber(int objectNumber) { @@ -100,9 +121,8 @@ public _FinalStage objectNumber(int objectNumber) { } @java.lang.Override - public DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate build() { - return new DocPagesInsertBlank200ResponseLayoutNamedPagesItemTargetTemplate( - objectNumber, additionalProperties); + public OutlineItemRef build() { + return new OutlineItemRef(kind, objectNumber, additionalProperties); } @java.lang.Override diff --git a/src/main/java/api/types/OutlineItemRefKind.java b/src/main/java/api/types/OutlineItemRefKind.java new file mode 100644 index 0000000..79d8efb --- /dev/null +++ b/src/main/java/api/types/OutlineItemRefKind.java @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class OutlineItemRefKind { + public static final OutlineItemRefKind OBJECT_NUMBER = new OutlineItemRefKind(Value.OBJECT_NUMBER, "objectNumber"); + + private final Value value; + + private final String string; + + OutlineItemRefKind(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof OutlineItemRefKind && this.string.equals(((OutlineItemRefKind) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OBJECT_NUMBER: + return visitor.visitObjectNumber(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OutlineItemRefKind valueOf(String value) { + switch (value) { + case "objectNumber": + return OBJECT_NUMBER; + default: + return new OutlineItemRefKind(Value.UNKNOWN, value); + } + } + + public enum Value { + OBJECT_NUMBER, + + UNKNOWN + } + + public interface Visitor { + T visitObjectNumber(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/api/types/OutlineMutationMeta.java b/src/main/java/api/types/OutlineMutationMeta.java new file mode 100644 index 0000000..a9b53dd --- /dev/null +++ b/src/main/java/api/types/OutlineMutationMeta.java @@ -0,0 +1,290 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlineMutationMeta.Builder.class) +public final class OutlineMutationMeta { + private final List affectedPages; + + private final Optional cacheDelta; + + private final String opId; + + private final boolean undoable; + + private final List changed; + + private final Map additionalProperties; + + private OutlineMutationMeta( + List affectedPages, + Optional cacheDelta, + String opId, + boolean undoable, + List changed, + Map additionalProperties) { + this.affectedPages = affectedPages; + this.cacheDelta = cacheDelta; + this.opId = opId; + this.undoable = undoable; + this.changed = changed; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("affectedPages") + public List getAffectedPages() { + return affectedPages; + } + + @JsonIgnore + public Optional getCacheDelta() { + if (cacheDelta == null) { + return Optional.empty(); + } + return cacheDelta; + } + + @JsonProperty("opId") + public String getOpId() { + return opId; + } + + @JsonProperty("undoable") + public boolean getUndoable() { + return undoable; + } + + @JsonProperty("changed") + public List getChanged() { + return changed; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cacheDelta") + private Optional _getCacheDelta() { + return cacheDelta; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineMutationMeta && equalTo((OutlineMutationMeta) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlineMutationMeta other) { + return affectedPages.equals(other.affectedPages) + && cacheDelta.equals(other.cacheDelta) + && opId.equals(other.opId) + && undoable == other.undoable + && changed.equals(other.changed); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.affectedPages, this.cacheDelta, this.opId, this.undoable, this.changed); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OpIdStage builder() { + return new Builder(); + } + + public interface OpIdStage { + UndoableStage opId(@NotNull String opId); + + Builder from(OutlineMutationMeta other); + } + + public interface UndoableStage { + _FinalStage undoable(boolean undoable); + } + + public interface _FinalStage { + OutlineMutationMeta build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage affectedPages(List affectedPages); + + _FinalStage addAffectedPages(PageRef affectedPages); + + _FinalStage addAllAffectedPages(List affectedPages); + + _FinalStage cacheDelta(Optional cacheDelta); + + _FinalStage cacheDelta(CacheDelta cacheDelta); + + _FinalStage cacheDelta(Nullable cacheDelta); + + _FinalStage changed(List changed); + + _FinalStage addChanged(OutlineItemRef changed); + + _FinalStage addAllChanged(List changed); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OpIdStage, UndoableStage, _FinalStage { + private String opId; + + private boolean undoable; + + private List changed = new ArrayList<>(); + + private Optional cacheDelta = Optional.empty(); + + private List affectedPages = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OutlineMutationMeta other) { + affectedPages(other.getAffectedPages()); + cacheDelta(other.getCacheDelta()); + opId(other.getOpId()); + undoable(other.getUndoable()); + changed(other.getChanged()); + return this; + } + + @java.lang.Override + @JsonSetter("opId") + public UndoableStage opId(@NotNull String opId) { + this.opId = Objects.requireNonNull(opId, "opId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("undoable") + public _FinalStage undoable(boolean undoable) { + this.undoable = undoable; + return this; + } + + @java.lang.Override + public _FinalStage addAllChanged(List changed) { + if (changed != null) { + this.changed.addAll(changed); + } + return this; + } + + @java.lang.Override + public _FinalStage addChanged(OutlineItemRef changed) { + this.changed.add(changed); + return this; + } + + @java.lang.Override + @JsonSetter(value = "changed", nulls = Nulls.SKIP) + public _FinalStage changed(List changed) { + this.changed.clear(); + if (changed != null) { + this.changed.addAll(changed); + } + return this; + } + + @java.lang.Override + public _FinalStage cacheDelta(Nullable cacheDelta) { + if (cacheDelta.isNull()) { + this.cacheDelta = null; + } else if (cacheDelta.isEmpty()) { + this.cacheDelta = Optional.empty(); + } else { + this.cacheDelta = Optional.of(cacheDelta.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage cacheDelta(CacheDelta cacheDelta) { + this.cacheDelta = Optional.ofNullable(cacheDelta); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cacheDelta", nulls = Nulls.SKIP) + public _FinalStage cacheDelta(Optional cacheDelta) { + this.cacheDelta = cacheDelta; + return this; + } + + @java.lang.Override + public _FinalStage addAllAffectedPages(List affectedPages) { + if (affectedPages != null) { + this.affectedPages.addAll(affectedPages); + } + return this; + } + + @java.lang.Override + public _FinalStage addAffectedPages(PageRef affectedPages) { + this.affectedPages.add(affectedPages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "affectedPages", nulls = Nulls.SKIP) + public _FinalStage affectedPages(List affectedPages) { + this.affectedPages.clear(); + if (affectedPages != null) { + this.affectedPages.addAll(affectedPages); + } + return this; + } + + @java.lang.Override + public OutlineMutationMeta build() { + return new OutlineMutationMeta(affectedPages, cacheDelta, opId, undoable, changed, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlineOrder.java b/src/main/java/api/types/OutlineOrder.java new file mode 100644 index 0000000..a00c37e --- /dev/null +++ b/src/main/java/api/types/OutlineOrder.java @@ -0,0 +1,163 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.Nullable; +import com.cloudpdf.api.core.NullableNonemptyFilter; +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlineOrder.Builder.class) +public final class OutlineOrder { + private final Optional parent; + + private final List children; + + private final Map additionalProperties; + + private OutlineOrder( + Optional parent, List children, Map additionalProperties) { + this.parent = parent; + this.children = children; + this.additionalProperties = additionalProperties; + } + + @JsonIgnore + public Optional getParent() { + if (parent == null) { + return Optional.empty(); + } + return parent; + } + + @JsonProperty("children") + public List getChildren() { + return children; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parent") + private Optional _getParent() { + return parent; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlineOrder && equalTo((OutlineOrder) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlineOrder other) { + return parent.equals(other.parent) && children.equals(other.children); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.parent, this.children); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional parent = Optional.empty(); + + private List children = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(OutlineOrder other) { + parent(other.getParent()); + children(other.getChildren()); + return this; + } + + @JsonSetter(value = "parent", nulls = Nulls.SKIP) + public Builder parent(Optional parent) { + this.parent = parent; + return this; + } + + public Builder parent(OutlineItemRef parent) { + this.parent = Optional.ofNullable(parent); + return this; + } + + public Builder parent(Nullable parent) { + if (parent.isNull()) { + this.parent = null; + } else if (parent.isEmpty()) { + this.parent = Optional.empty(); + } else { + this.parent = Optional.of(parent.get()); + } + return this; + } + + @JsonSetter(value = "children", nulls = Nulls.SKIP) + public Builder children(List children) { + this.children.clear(); + if (children != null) { + this.children.addAll(children); + } + return this; + } + + public Builder addChildren(OutlineItemRef children) { + this.children.add(children); + return this; + } + + public Builder addAllChildren(List children) { + if (children != null) { + this.children.addAll(children); + } + return this; + } + + public OutlineOrder build() { + return new OutlineOrder(parent, children, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlinePosition.java b/src/main/java/api/types/OutlinePosition.java new file mode 100644 index 0000000..e1ebfca --- /dev/null +++ b/src/main/java/api/types/OutlinePosition.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = OutlinePosition.Deserializer.class) +public final class OutlinePosition { + private final Object value; + + private final int type; + + private OutlinePosition(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OutlinePositionZero) this.value); + } else if (this.type == 1) { + return visitor.visit((OutlinePositionAfter) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlinePosition && equalTo((OutlinePosition) other); + } + + private boolean equalTo(OutlinePosition other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static OutlinePosition of(OutlinePositionZero value) { + return new OutlinePosition(value, 0); + } + + public static OutlinePosition of(OutlinePositionAfter value) { + return new OutlinePosition(value, 1); + } + + public interface Visitor { + T visit(OutlinePositionZero value); + + T visit(OutlinePositionAfter value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(OutlinePosition.class); + } + + @java.lang.Override + public OutlinePosition deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OutlinePositionZero.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OutlinePositionAfter.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/api/types/OutlinePositionAfter.java b/src/main/java/api/types/OutlinePositionAfter.java new file mode 100644 index 0000000..baf5698 --- /dev/null +++ b/src/main/java/api/types/OutlinePositionAfter.java @@ -0,0 +1,128 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.cloudpdf.api.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OutlinePositionAfter.Builder.class) +public final class OutlinePositionAfter { + private final Optional before; + + private final Optional after; + + private final Map additionalProperties; + + private OutlinePositionAfter( + Optional before, Optional after, Map additionalProperties) { + this.before = before; + this.after = after; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("before") + public Optional getBefore() { + return before; + } + + @JsonProperty("after") + public Optional getAfter() { + return after; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OutlinePositionAfter && equalTo((OutlinePositionAfter) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OutlinePositionAfter other) { + return before.equals(other.before) && after.equals(other.after); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.before, this.after); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional before = Optional.empty(); + + private Optional after = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(OutlinePositionAfter other) { + before(other.getBefore()); + after(other.getAfter()); + return this; + } + + @JsonSetter(value = "before", nulls = Nulls.SKIP) + public Builder before(Optional before) { + this.before = before; + return this; + } + + public Builder before(OutlineItemRef before) { + this.before = Optional.ofNullable(before); + return this; + } + + @JsonSetter(value = "after", nulls = Nulls.SKIP) + public Builder after(Optional after) { + this.after = after; + return this; + } + + public Builder after(OutlineItemRef after) { + this.after = Optional.ofNullable(after); + return this; + } + + public OutlinePositionAfter build() { + return new OutlinePositionAfter(before, after, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/api/types/OutlinePositionZero.java b/src/main/java/api/types/OutlinePositionZero.java new file mode 100644 index 0000000..414c6c3 --- /dev/null +++ b/src/main/java/api/types/OutlinePositionZero.java @@ -0,0 +1,83 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.cloudpdf.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class OutlinePositionZero { + public static final OutlinePositionZero START = new OutlinePositionZero(Value.START, "start"); + + public static final OutlinePositionZero END = new OutlinePositionZero(Value.END, "end"); + + private final Value value; + + private final String string; + + OutlinePositionZero(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof OutlinePositionZero && this.string.equals(((OutlinePositionZero) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case START: + return visitor.visitStart(); + case END: + return visitor.visitEnd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OutlinePositionZero valueOf(String value) { + switch (value) { + case "start": + return START; + case "end": + return END; + default: + return new OutlinePositionZero(Value.UNKNOWN, value); + } + } + + public enum Value { + START, + + END, + + UNKNOWN + } + + public interface Visitor { + T visitStart(); + + T visitEnd(); + + T visitUnknown(String unknownType); + } +}