diff --git a/.codegen.json b/.codegen.json index a6d85c56d..92e3696b9 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "d55532c", "specHash": "e21eebc", "version": "5.19.0" } +{ "engineHash": "d55532c", "specHash": "a0e8038", "version": "5.19.0" } diff --git a/docs/sdkgen/README.md b/docs/sdkgen/README.md index c41719199..6da729c0c 100644 --- a/docs/sdkgen/README.md +++ b/docs/sdkgen/README.md @@ -29,6 +29,7 @@ the SDK are available by topic: * [Devicepinners](devicepinners.md) * [Docgen](docgen.md) * [Docgentemplate](docgentemplate.md) +* [Documentsplit](documentsplit.md) * [Downloads](downloads.md) * [Emailaliases](emailaliases.md) * [Enterpriseconfigurations](enterpriseconfigurations.md) @@ -78,6 +79,7 @@ the SDK are available by topic: * [Shieldinformationbarriersegmentrestrictions](shieldinformationbarriersegmentrestrictions.md) * [Shieldinformationbarriersegments](shieldinformationbarriersegments.md) * [Shieldlists](shieldlists.md) +* [Shuttle](shuttle.md) * [Signrequests](signrequests.md) * [Signtemplates](signtemplates.md) * [Skills](skills.md) diff --git a/docs/sdkgen/documentsplit.md b/docs/sdkgen/documentsplit.md new file mode 100644 index 000000000..477f5dc3b --- /dev/null +++ b/docs/sdkgen/documentsplit.md @@ -0,0 +1,101 @@ +# DocumentSplitManager + + +- [Create Document Split job](#create-document-split-job) +- [List Document Split jobs](#list-document-split-jobs) +- [Get Document Split job by ID](#get-document-split-job-by-id) + +## Create Document Split job + +Initiates a Document Split job for the supplied source file. The job runs +asynchronously; clients can poll the returned job ID to track progress. + +All split-specific input lives under `split_input`. When +`split_input.split_type` is `manual`, provide +`split_input.split_definition` (continuous page ranges; `version` may be +omitted or `v_1`). When `split_input.split_type` is `page_selection`, +provide `split_input.page_selection` (non-linear page segments; `version` +may be omitted or `v_2`). `split_input.prompt` must not be provided for +either of those variants. When `split_input.split_type` is `smart`, +`split_input.prompt` is required and neither +`split_input.split_definition` nor `split_input.page_selection` must be +provided. + +This operation is performed by calling function `createDocumentSplitV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-document-splits/). + +*Currently we don't have an example for calling `createDocumentSplitV2026R0` in integration tests* + +### Arguments + +- requestBody `DocumentSplitCreateRequestV2026R0` + - Request body of createDocumentSplitV2026R0 method +- headers `CreateDocumentSplitV2026R0Headers` + - Headers of createDocumentSplitV2026R0 method + + +### Returns + +This function returns a value of type `DocumentSplitCreateResponseV2026R0`. + +The Document Split job was accepted for processing. Returns a reference +to the newly created job. + + +## List Document Split jobs + +Returns a paginated list of Document Split jobs accessible to the +authenticated user. + +This operation is performed by calling function `getDocumentSplitsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-document-splits/). + +*Currently we don't have an example for calling `getDocumentSplitsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetDocumentSplitsV2026R0QueryParams` + - Query parameters of getDocumentSplitsV2026R0 method +- headers `GetDocumentSplitsV2026R0Headers` + - Headers of getDocumentSplitsV2026R0 method + + +### Returns + +This function returns a value of type `DocumentSplitsV2026R0`. + +Returns a paginated list of Document Split jobs. + + +## Get Document Split job by ID + +Returns details for a single Document Split job identified by its ID, +including the current status, the input definition, and any output files +produced by the job. + +This operation is performed by calling function `getDocumentSplitByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-document-splits-id/). + +*Currently we don't have an example for calling `getDocumentSplitByIdV2026R0` in integration tests* + +### Arguments + +- documentSplitId `String` + - The unique identifier for the Document Split job. Example: "1748426" +- headers `GetDocumentSplitByIdV2026R0Headers` + - Headers of getDocumentSplitByIdV2026R0 method + + +### Returns + +This function returns a value of type `DocumentSplitV2026R0`. + +Returns the Document Split job. + + diff --git a/docs/sdkgen/shuttle.md b/docs/sdkgen/shuttle.md new file mode 100644 index 000000000..dcfd7b519 --- /dev/null +++ b/docs/sdkgen/shuttle.md @@ -0,0 +1,1181 @@ +# ShuttleManager + + +- [List shuttle systems](#list-shuttle-systems) +- [Create shuttle system](#create-shuttle-system) +- [Get shuttle system by ID](#get-shuttle-system-by-id) +- [Update shuttle system](#update-shuttle-system) +- [Delete shuttle system](#delete-shuttle-system) +- [Issue registration token for Windows system](#issue-registration-token-for-windows-system) +- [List shuttle jobs](#list-shuttle-jobs) +- [Create shuttle job](#create-shuttle-job) +- [Get shuttle job by ID](#get-shuttle-job-by-id) +- [Update shuttle job](#update-shuttle-job) +- [Delete shuttle job](#delete-shuttle-job) +- [Start shuttle job](#start-shuttle-job) +- [Stop shuttle job](#stop-shuttle-job) +- [Prepare migration](#prepare-migration) +- [List shuttle runs](#list-shuttle-runs) +- [Get shuttle run by ID](#get-shuttle-run-by-id) +- [List shuttle job schedules](#list-shuttle-job-schedules) +- [Create shuttle job schedule](#create-shuttle-job-schedule) +- [Get shuttle job schedule](#get-shuttle-job-schedule) +- [Update shuttle job schedule](#update-shuttle-job-schedule) +- [Delete shuttle job schedule](#delete-shuttle-job-schedule) +- [List shuttle path mappings](#list-shuttle-path-mappings) +- [Create shuttle path mapping](#create-shuttle-path-mapping) +- [Get shuttle path mapping by ID](#get-shuttle-path-mapping-by-id) +- [Update shuttle path mapping](#update-shuttle-path-mapping) +- [Delete shuttle path mapping](#delete-shuttle-path-mapping) +- [Create shuttle path mapping import](#create-shuttle-path-mapping-import) +- [Create shuttle subject mapping import](#create-shuttle-subject-mapping-import) +- [List shuttle subject mappings](#list-shuttle-subject-mappings) +- [Create shuttle subject mapping](#create-shuttle-subject-mapping) +- [Get shuttle subject mapping by ID](#get-shuttle-subject-mapping-by-id) +- [Update shuttle subject mapping](#update-shuttle-subject-mapping) +- [Delete shuttle subject mapping](#delete-shuttle-subject-mapping) +- [List shuttle discovered subjects](#list-shuttle-discovered-subjects) +- [List shuttle path entries](#list-shuttle-path-entries) +- [List shuttle mapping errors](#list-shuttle-mapping-errors) +- [List shuttle reports](#list-shuttle-reports) +- [Create shuttle report](#create-shuttle-report) +- [Get shuttle report by ID](#get-shuttle-report-by-id) + +## List shuttle systems + +Returns a paginated list of shuttle systems accessible to the +authenticated user. + +This operation is performed by calling function `getShuttleSystemsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-systems/). + +*Currently we don't have an example for calling `getShuttleSystemsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleSystemsV2026R0QueryParams` + - Query parameters of getShuttleSystemsV2026R0 method +- headers `GetShuttleSystemsV2026R0Headers` + - Headers of getShuttleSystemsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSystemsV2026R0`. + +Returns a paginated list of shuttle systems. + + +## Create shuttle system + +Creates a new shuttle system. Only Windows agent systems can be created +through the public API; other system types must be configured through the +Shuttle application. + +This operation is performed by calling function `createShuttleSystemV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-systems/). + +*Currently we don't have an example for calling `createShuttleSystemV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleSystemCreateRequestV2026R0` + - Request body of createShuttleSystemV2026R0 method +- headers `CreateShuttleSystemV2026R0Headers` + - Headers of createShuttleSystemV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the newly created shuttle system. + + +## Get shuttle system by ID + +Returns details for a single shuttle system identified by its ID, +including its type and connection state. + +This operation is performed by calling function `getShuttleSystemByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-systems-id/). + +*Currently we don't have an example for calling `getShuttleSystemByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSystemId `String` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- headers `GetShuttleSystemByIdV2026R0Headers` + - Headers of getShuttleSystemByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the shuttle system. + + +## Update shuttle system + +Updates the mutable properties of an existing shuttle system identified by +its ID. Only the fields supplied in the request body are changed. + +This operation is performed by calling function `updateShuttleSystemByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-systems-id/). + +*Currently we don't have an example for calling `updateShuttleSystemByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSystemId `String` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- requestBody `ShuttleSystemUpdateRequestV2026R0` + - Request body of updateShuttleSystemByIdV2026R0 method +- headers `UpdateShuttleSystemByIdV2026R0Headers` + - Headers of updateShuttleSystemByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the updated shuttle system. + + +## Delete shuttle system + +Permanently deletes the shuttle system identified by its ID. This does not +affect content that has already been migrated. + +This operation is performed by calling function `deleteShuttleSystemByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-systems-id/). + +*Currently we don't have an example for calling `deleteShuttleSystemByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSystemId `String` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- headers `DeleteShuttleSystemByIdV2026R0Headers` + - Headers of deleteShuttleSystemByIdV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +Returns an empty response when the shuttle system was successfully +deleted. + + +## Issue registration token for Windows system + +Issues a new installation token for the Windows shuttle system identified +by its ID. Paste the returned token into the Windows agent installer to +register the agent with this system. + +This operation is performed by calling function `createShuttleSystemIssueRegistrationTokenV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-systems-id-issue-registration-token/). + +*Currently we don't have an example for calling `createShuttleSystemIssueRegistrationTokenV2026R0` in integration tests* + +### Arguments + +- shuttleSystemId `String` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- headers `CreateShuttleSystemIssueRegistrationTokenV2026R0Headers` + - Headers of createShuttleSystemIssueRegistrationTokenV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleAgentCredentialsV2026R0`. + +Returns the agent installation credentials for the Windows system. + + +## List shuttle jobs + +Returns a paginated list of shuttle jobs accessible to the authenticated +user. + +This operation is performed by calling function `getShuttleJobsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-jobs/). + +*Currently we don't have an example for calling `getShuttleJobsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleJobsV2026R0QueryParams` + - Query parameters of getShuttleJobsV2026R0 method +- headers `GetShuttleJobsV2026R0Headers` + - Headers of getShuttleJobsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobsV2026R0`. + +Returns a paginated list of shuttle jobs. + + +## Create shuttle job + +Creates a new shuttle job that describes a migration from the given source +system into Box. + +This operation is performed by calling function `createShuttleJobV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs/). + +*Currently we don't have an example for calling `createShuttleJobV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleJobCreateRequestV2026R0` + - Request body of createShuttleJobV2026R0 method +- headers `CreateShuttleJobV2026R0Headers` + - Headers of createShuttleJobV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the newly created shuttle job. + + +## Get shuttle job by ID + +Returns details for a single shuttle job identified by its ID, including +its current state, mapping-preparation state, and configured source system. + +This operation is performed by calling function `getShuttleJobByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-jobs-id/). + +*Currently we don't have an example for calling `getShuttleJobByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- headers `GetShuttleJobByIdV2026R0Headers` + - Headers of getShuttleJobByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the shuttle job. + + +## Update shuttle job + +Updates the mutable properties of an existing shuttle job identified by its +ID. Only the fields supplied in the request body are changed. + +This operation is performed by calling function `updateShuttleJobByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-jobs-id/). + +*Currently we don't have an example for calling `updateShuttleJobByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- requestBody `ShuttleJobUpdateRequestV2026R0` + - Request body of updateShuttleJobByIdV2026R0 method +- headers `UpdateShuttleJobByIdV2026R0Headers` + - Headers of updateShuttleJobByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the updated shuttle job. + + +## Delete shuttle job + +Permanently deletes the shuttle job identified by its ID. This does not +affect content that has already been migrated. + +This operation is performed by calling function `deleteShuttleJobByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-jobs-id/). + +*Currently we don't have an example for calling `deleteShuttleJobByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- headers `DeleteShuttleJobByIdV2026R0Headers` + - Headers of deleteShuttleJobByIdV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +Returns an empty response when the shuttle job was successfully deleted. + + +## Start shuttle job + +Starts the job in the given mode. When no body is provided the job runs in +simulation mode. + +This operation is performed by calling function `createShuttleJobStartV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-start/). + +*Currently we don't have an example for calling `createShuttleJobStartV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- requestBody `ShuttleJobStartRequestV2026R0` + - Request body of createShuttleJobStartV2026R0 method +- headers `CreateShuttleJobStartV2026R0Headers` + - Headers of createShuttleJobStartV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +The shuttle job was accepted and is being started. + + +## Stop shuttle job + +Stops a running shuttle job identified by its ID. Any work already in +progress is allowed to finish before the job transitions to a stopped +state. + +This operation is performed by calling function `createShuttleJobStopV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-stop/). + +*Currently we don't have an example for calling `createShuttleJobStopV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- headers `CreateShuttleJobStopV2026R0Headers` + - Headers of createShuttleJobStopV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +The shuttle job was accepted and is being stopped. + + +## Prepare migration + +Validates the configured account and path mappings before a transfer. Only +relevant when account mapping is enabled. + +This operation is performed by calling function `createShuttleJobPrepareMigrationV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-prepare-migration/). + +*Currently we don't have an example for calling `createShuttleJobPrepareMigrationV2026R0` in integration tests* + +### Arguments + +- shuttleJobId `String` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- headers `CreateShuttleJobPrepareMigrationV2026R0Headers` + - Headers of createShuttleJobPrepareMigrationV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +The migration preparation was accepted and is being processed. + + +## List shuttle runs + +Returns a paginated list of runs for the shuttle job identified by +`job_id`. + +This operation is performed by calling function `getShuttleRunsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-runs/). + +*Currently we don't have an example for calling `getShuttleRunsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleRunsV2026R0QueryParams` + - Query parameters of getShuttleRunsV2026R0 method +- headers `GetShuttleRunsV2026R0Headers` + - Headers of getShuttleRunsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleRunsV2026R0`. + +Returns a paginated list of shuttle runs. + + +## Get shuttle run by ID + +Returns details for a single shuttle run identified by its ID, including +its mode, state, timing, and transfer statistics. + +This operation is performed by calling function `getShuttleRunByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-runs-id/). + +*Currently we don't have an example for calling `getShuttleRunByIdV2026R0` in integration tests* + +### Arguments + +- shuttleRunId `String` + - The unique identifier for the shuttle run, in the form `{job_id}:{run_number}`. Example: "6a3ba68e810d9156194530a1:42" +- headers `GetShuttleRunByIdV2026R0Headers` + - Headers of getShuttleRunByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleRunV2026R0`. + +Returns the shuttle run. + + +## List shuttle job schedules + +Returns a paginated list of schedules for the shuttle job identified by +`job_id`. + +This operation is performed by calling function `getShuttleJobSchedulesV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-job-schedules/). + +*Currently we don't have an example for calling `getShuttleJobSchedulesV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleJobSchedulesV2026R0QueryParams` + - Query parameters of getShuttleJobSchedulesV2026R0 method +- headers `GetShuttleJobSchedulesV2026R0Headers` + - Headers of getShuttleJobSchedulesV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobSchedulesV2026R0`. + +Returns a paginated list of shuttle job schedules. + + +## Create shuttle job schedule + +Creates a schedule that starts runs of the shuttle job identified by +`job_id`. The schedule starts a run either at a wall-clock time or after +another job's run meets a condition. Schedules cannot start a run in +`scan` mode. + +This operation is performed by calling function `createShuttleJobScheduleV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-job-schedules/). + +*Currently we don't have an example for calling `createShuttleJobScheduleV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleJobScheduleCreateRequestV2026R0` + - Request body of createShuttleJobScheduleV2026R0 method +- headers `CreateShuttleJobScheduleV2026R0Headers` + - Headers of createShuttleJobScheduleV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the newly created shuttle job schedule. + + +## Get shuttle job schedule + +Retrieves the shuttle job schedule identified by its ID. + +This operation is performed by calling function `getShuttleJobScheduleByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-job-schedules-id/). + +*Currently we don't have an example for calling `getShuttleJobScheduleByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobScheduleId `String` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- headers `GetShuttleJobScheduleByIdV2026R0Headers` + - Headers of getShuttleJobScheduleByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the shuttle job schedule. + + +## Update shuttle job schedule + +Updates the mutable properties of an existing shuttle job schedule +identified by its ID. Only the fields supplied in the request body are +changed. The owning job cannot be changed. + +This operation is performed by calling function `updateShuttleJobScheduleByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-job-schedules-id/). + +*Currently we don't have an example for calling `updateShuttleJobScheduleByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobScheduleId `String` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- requestBody `ShuttleJobScheduleUpdateRequestV2026R0` + - Request body of updateShuttleJobScheduleByIdV2026R0 method +- headers `UpdateShuttleJobScheduleByIdV2026R0Headers` + - Headers of updateShuttleJobScheduleByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the updated shuttle job schedule. + + +## Delete shuttle job schedule + +Permanently deletes the shuttle job schedule identified by its ID. This +does not affect runs that have already started. + +This operation is performed by calling function `deleteShuttleJobScheduleByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-job-schedules-id/). + +*Currently we don't have an example for calling `deleteShuttleJobScheduleByIdV2026R0` in integration tests* + +### Arguments + +- shuttleJobScheduleId `String` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- headers `DeleteShuttleJobScheduleByIdV2026R0Headers` + - Headers of deleteShuttleJobScheduleByIdV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +Returns an empty response when the shuttle job schedule was +successfully deleted. + + +## List shuttle path mappings + +Returns a paginated list of path mappings for the shuttle job identified +by `job_id`. + +This operation is performed by calling function `getShuttlePathMappingsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-mappings/). + +*Currently we don't have an example for calling `getShuttlePathMappingsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttlePathMappingsV2026R0QueryParams` + - Query parameters of getShuttlePathMappingsV2026R0 method +- headers `GetShuttlePathMappingsV2026R0Headers` + - Headers of getShuttlePathMappingsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttlePathMappingsV2026R0`. + +Returns a paginated list of shuttle path mappings. + + +## Create shuttle path mapping + +Creates a path mapping that connects a source location on the migrated +system to a destination in Box for the given shuttle job. + +This operation is performed by calling function `createShuttlePathMappingV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-path-mappings/). + +*Currently we don't have an example for calling `createShuttlePathMappingV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttlePathMappingCreateRequestV2026R0` + - Request body of createShuttlePathMappingV2026R0 method +- headers `CreateShuttlePathMappingV2026R0Headers` + - Headers of createShuttlePathMappingV2026R0 method + + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the newly created shuttle path mapping. + + +## Get shuttle path mapping by ID + +Returns details for a single shuttle path mapping identified by its ID, +including the source location and destination, if any. + +This operation is performed by calling function `getShuttlePathMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-mappings-id/). + +*Currently we don't have an example for calling `getShuttlePathMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttlePathMappingId `String` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- headers `GetShuttlePathMappingByIdV2026R0Headers` + - Headers of getShuttlePathMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the shuttle path mapping. + + +## Update shuttle path mapping + +Updates the mutable properties of an existing shuttle path mapping +identified by its ID. Only the fields supplied in the request body are +changed. + +This operation is performed by calling function `updateShuttlePathMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-path-mappings-id/). + +*Currently we don't have an example for calling `updateShuttlePathMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttlePathMappingId `String` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- requestBody `ShuttlePathMappingUpdateRequestV2026R0` + - Request body of updateShuttlePathMappingByIdV2026R0 method +- headers `UpdateShuttlePathMappingByIdV2026R0Headers` + - Headers of updateShuttlePathMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the updated shuttle path mapping. + + +## Delete shuttle path mapping + +Permanently deletes the shuttle path mapping identified by its ID. This +does not affect content that has already been migrated. + +This operation is performed by calling function `deleteShuttlePathMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-path-mappings-id/). + +*Currently we don't have an example for calling `deleteShuttlePathMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttlePathMappingId `String` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- headers `DeleteShuttlePathMappingByIdV2026R0Headers` + - Headers of deleteShuttlePathMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +Returns an empty response when the shuttle path mapping was +successfully deleted. + + +## Create shuttle path mapping import + +Accepts a spreadsheet of path mappings, already stored in Box, and replaces +the job's path mappings. +A file that is not a mapping workbook, or that exceeds the size or row +limits (10 MiB Box download limit; 100,000 mapping rows), returns `400` +synchronously and leaves the job unchanged. +An accepted import always replaces every path mapping on the job. When all +rows are valid the workbook is deployed in full. When any row is invalid +the job ends with no path mappings and `mapping_state` becomes +`paths_import_rejected` until the next import or the next manual +path-mapping change. Row problems are listed by +`GET /shuttle_mapping_errors?job_id=…` with category `path_import`, messages +of the form `Row N: …`, at most 500 entries plus one overflow entry. +Validation and deployment are asynchronous after acceptance. Poll +`GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is +`importing_paths`. Only one import may be in flight per job. + +This operation is performed by calling function `createShuttlePathMappingImportV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-path-mapping-imports/). + +*Currently we don't have an example for calling `createShuttlePathMappingImportV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttlePathMappingImportCreateRequestV2026R0` + - Request body of createShuttlePathMappingImportV2026R0 method +- headers `CreateShuttlePathMappingImportV2026R0Headers` + - Headers of createShuttlePathMappingImportV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +The import was accepted. Validation and deployment continue +asynchronously. Poll `GET /shuttle_jobs/{shuttle_job_id}` until +`mapping_state` is no longer `importing_paths`. A rejected import ends +with `mapping_state` `paths_import_rejected` and an empty path-mapping +list; a successful import moves on to a later mapping-preparation state +such as `paths_ready` or `ready`. + + +## Create shuttle subject mapping import + +Accepts a spreadsheet of subject (user and group) mappings, already stored +in Box, and replaces the job's subject mappings. +A file that is not a subject-mapping workbook, or that exceeds the size or +row limits (10 MiB Box download limit; 50,000 mapping rows), returns `400` +synchronously and leaves the job unchanged. +An accepted import always replaces every subject mapping on the job. When +all rows are valid the workbook is deployed in full. When any row is +invalid the job ends with no subject mappings and `mapping_state` becomes +`subjects_import_rejected` until the next import or the next manual +subject-mapping change. Row problems are listed by +`GET /shuttle_mapping_errors?job_id=…` with category `subject_import`, +messages of the form `Row N: …`, at most 500 entries plus one overflow +entry. +Validation and deployment are asynchronous after acceptance. Poll +`GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is +`importing_subjects`. Only one import may be in flight per job. The job +must map subjects (`account_mapping` enabled) and its source scan must be +finished; otherwise the request returns `409`. + +Expected workbook format (API clients cannot download the UI template): +sheets `Users` and/or `Groups` (a sheet named `Subjects` is also accepted). +Columns are `Source User `, `Target User `, `Skip` on `Users`, +and `Source Group `, `Target Group `, `Skip` on `Groups`, where +`` is the primary identifier for that role and system: +- Users: `Email` for most systems; `ID` for `SharePoint` (2007/2010/2013); + `Name` for Windows (`windows_union`, stored as the user id). +- Groups: `Name` for most systems; `Email` for Google Drive admin groups. +Source rows for a template can be taken from +`GET /shuttle_discovered_subjects`. + +This operation is performed by calling function `createShuttleSubjectMappingImportV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-subject-mapping-imports/). + +*Currently we don't have an example for calling `createShuttleSubjectMappingImportV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleSubjectMappingImportCreateRequestV2026R0` + - Request body of createShuttleSubjectMappingImportV2026R0 method +- headers `CreateShuttleSubjectMappingImportV2026R0Headers` + - Headers of createShuttleSubjectMappingImportV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +The import was accepted. Validation and deployment continue +asynchronously. Poll `GET /shuttle_jobs/{shuttle_job_id}` until +`mapping_state` is no longer `importing_subjects`. A rejected import +ends with `mapping_state` `subjects_import_rejected` and an empty +subject-mapping list; a successful import moves on to a later +mapping-preparation state such as `mapping_complete` or `ready`. + + +## List shuttle subject mappings + +Returns a paginated list of subject mappings for the shuttle job identified +by `job_id`. + +This operation is performed by calling function `getShuttleSubjectMappingsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-subject-mappings/). + +*Currently we don't have an example for calling `getShuttleSubjectMappingsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleSubjectMappingsV2026R0QueryParams` + - Query parameters of getShuttleSubjectMappingsV2026R0 method +- headers `GetShuttleSubjectMappingsV2026R0Headers` + - Headers of getShuttleSubjectMappingsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSubjectMappingsV2026R0`. + +Returns a paginated list of shuttle subject mappings. + + +## Create shuttle subject mapping + +Creates a subject mapping that connects a discovered source subject to a +Box user or group for the given shuttle job. + +This operation is performed by calling function `createShuttleSubjectMappingV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-subject-mappings/). + +*Currently we don't have an example for calling `createShuttleSubjectMappingV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleSubjectMappingCreateRequestV2026R0` + - Request body of createShuttleSubjectMappingV2026R0 method +- headers `CreateShuttleSubjectMappingV2026R0Headers` + - Headers of createShuttleSubjectMappingV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the newly created shuttle subject mapping. + + +## Get shuttle subject mapping by ID + +Returns details for a single shuttle subject mapping identified by its ID, +including the source subject and Box target, if any. + +This operation is performed by calling function `getShuttleSubjectMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-subject-mappings-id/). + +*Currently we don't have an example for calling `getShuttleSubjectMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSubjectMappingId `String` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- headers `GetShuttleSubjectMappingByIdV2026R0Headers` + - Headers of getShuttleSubjectMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the shuttle subject mapping. + + +## Update shuttle subject mapping + +Updates the mutable properties of an existing shuttle subject mapping +identified by its ID. Only the fields supplied in the request body are +changed. + +This operation is performed by calling function `updateShuttleSubjectMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-subject-mappings-id/). + +*Currently we don't have an example for calling `updateShuttleSubjectMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSubjectMappingId `String` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- requestBody `ShuttleSubjectMappingUpdateRequestV2026R0` + - Request body of updateShuttleSubjectMappingByIdV2026R0 method +- headers `UpdateShuttleSubjectMappingByIdV2026R0Headers` + - Headers of updateShuttleSubjectMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the updated shuttle subject mapping. + + +## Delete shuttle subject mapping + +Permanently deletes the shuttle subject mapping identified by its ID. + +This operation is performed by calling function `deleteShuttleSubjectMappingByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-subject-mappings-id/). + +*Currently we don't have an example for calling `deleteShuttleSubjectMappingByIdV2026R0` in integration tests* + +### Arguments + +- shuttleSubjectMappingId `String` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- headers `DeleteShuttleSubjectMappingByIdV2026R0Headers` + - Headers of deleteShuttleSubjectMappingByIdV2026R0 method + + +### Returns + +This function returns a value of type `void`. + +Returns an empty response when the shuttle subject mapping was +successfully deleted. + + +## List shuttle discovered subjects + +Returns a paginated list of subjects discovered on the source system for +the shuttle job identified by `job_id`. + +This operation is performed by calling function `getShuttleDiscoveredSubjectsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-discovered-subjects/). + +*Currently we don't have an example for calling `getShuttleDiscoveredSubjectsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleDiscoveredSubjectsV2026R0QueryParams` + - Query parameters of getShuttleDiscoveredSubjectsV2026R0 method +- headers `GetShuttleDiscoveredSubjectsV2026R0Headers` + - Headers of getShuttleDiscoveredSubjectsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleDiscoveredSubjectsV2026R0`. + +Returns a paginated list of discovered subjects. + + +## List shuttle path entries + +Returns a paginated list of source or target path entries for a shuttle +job. Call with only `job_id` and `side` to list the roots, then browse one +level at a time using `path`, `path_id`, or both. Each entry includes +`path`, `path_id`, `is_directory`, and a `scope` object (`account` or +`shared_space`) so a mapping can be created from that row without extra +browse state. Valid values depend on the selected system. + +This operation is performed by calling function `getShuttlePathEntriesV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-entries/). + +*Currently we don't have an example for calling `getShuttlePathEntriesV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttlePathEntriesV2026R0QueryParams` + - Query parameters of getShuttlePathEntriesV2026R0 method +- headers `GetShuttlePathEntriesV2026R0Headers` + - Headers of getShuttlePathEntriesV2026R0 method + + +### Returns + +This function returns a value of type `ShuttlePathEntriesV2026R0`. + +Returns a paginated list of shuttle path entries. + + +## List shuttle mapping errors + +Returns a paginated list of mapping errors for a shuttle job. Only the latest +record for each error is returned. The revision field identifies the mapping +revision in which that error was generated. + +This operation is performed by calling function `getShuttleMappingErrorsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-mapping-errors/). + +*Currently we don't have an example for calling `getShuttleMappingErrorsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleMappingErrorsV2026R0QueryParams` + - Query parameters of getShuttleMappingErrorsV2026R0 method +- headers `GetShuttleMappingErrorsV2026R0Headers` + - Headers of getShuttleMappingErrorsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleMappingErrorsV2026R0`. + +Returns a paginated list of shuttle mapping errors. + + +## List shuttle reports + +Returns a paginated list of reports generated for the shuttle run +identified by `run_id`. + +This operation is performed by calling function `getShuttleReportsV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-reports/). + +*Currently we don't have an example for calling `getShuttleReportsV2026R0` in integration tests* + +### Arguments + +- queryParams `GetShuttleReportsV2026R0QueryParams` + - Query parameters of getShuttleReportsV2026R0 method +- headers `GetShuttleReportsV2026R0Headers` + - Headers of getShuttleReportsV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleReportsV2026R0`. + +Returns a paginated list of shuttle reports. + + +## Create shuttle report + +Requests asynchronous generation of a report for a shuttle run. The +report is returned immediately in `pending` or `processing` status. +Poll `GET /shuttle_reports/{shuttle_report_id}` while `status` is +`pending` or `processing`. Stop when `status` is `complete`, `failed`, +`canceled`, or `unknown`. Repeating this request with the same +parameters reuses the existing report instead of creating a duplicate. + +This operation is performed by calling function `createShuttleReportV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-reports/). + +*Currently we don't have an example for calling `createShuttleReportV2026R0` in integration tests* + +### Arguments + +- requestBody `ShuttleReportCreateRequestV2026R0` + - Request body of createShuttleReportV2026R0 method +- headers `CreateShuttleReportV2026R0Headers` + - Headers of createShuttleReportV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleReportV2026R0`. + +The report was accepted for generation. Returns the shuttle report; +generation continues asynchronously. Repeating this request with the +same parameters reuses the existing report instead of creating a +duplicate. + + +## Get shuttle report by ID + +Returns details for a single shuttle report identified by its ID, +including generation status and, once generation finishes, the Box +output reference. + +This operation is performed by calling function `getShuttleReportByIdV2026R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-reports-id/). + +*Currently we don't have an example for calling `getShuttleReportByIdV2026R0` in integration tests* + +### Arguments + +- shuttleReportId `String` + - The unique identifier for the shuttle report. Example: "6a3ba8d14f2c91e8370b4d12" +- headers `GetShuttleReportByIdV2026R0Headers` + - Headers of getShuttleReportByIdV2026R0 method + + +### Returns + +This function returns a value of type `ShuttleReportV2026R0`. + +Returns the shuttle report. + + diff --git a/docs/sdkgen/users.md b/docs/sdkgen/users.md index 3eb493ae0..9081c5a71 100644 --- a/docs/sdkgen/users.md +++ b/docs/sdkgen/users.md @@ -201,6 +201,12 @@ still owns any content. To proceed, move their owned content first, or use the `force` parameter to delete the user and their files. +If the enterprise has a retention policy, including a retired one, or a +legal hold that is not fully released, you can't delete a user who owns +content, even with `force`. Transfer the user's content first by using the +[Transfer owned folders](https://developer.box.com/reference/put-users-id-folders-0) +endpoint. + This operation is performed by calling function `deleteUserById`. See the endpoint docs at diff --git a/src/main/java/com/box/sdkgen/client/BoxClient.java b/src/main/java/com/box/sdkgen/client/BoxClient.java index ca6d8f7d3..a46b0c350 100644 --- a/src/main/java/com/box/sdkgen/client/BoxClient.java +++ b/src/main/java/com/box/sdkgen/client/BoxClient.java @@ -19,6 +19,7 @@ import com.box.sdkgen.managers.devicepinners.DevicePinnersManager; import com.box.sdkgen.managers.docgen.DocgenManager; import com.box.sdkgen.managers.docgentemplate.DocgenTemplateManager; +import com.box.sdkgen.managers.documentsplit.DocumentSplitManager; import com.box.sdkgen.managers.downloads.DownloadsManager; import com.box.sdkgen.managers.emailaliases.EmailAliasesManager; import com.box.sdkgen.managers.enterpriseconfigurations.EnterpriseConfigurationsManager; @@ -68,6 +69,7 @@ import com.box.sdkgen.managers.shieldinformationbarriersegmentrestrictions.ShieldInformationBarrierSegmentRestrictionsManager; import com.box.sdkgen.managers.shieldinformationbarriersegments.ShieldInformationBarrierSegmentsManager; import com.box.sdkgen.managers.shieldlists.ShieldListsManager; +import com.box.sdkgen.managers.shuttle.ShuttleManager; import com.box.sdkgen.managers.signrequests.SignRequestsManager; import com.box.sdkgen.managers.signtemplates.SignTemplatesManager; import com.box.sdkgen.managers.skills.SkillsManager; @@ -277,8 +279,12 @@ public class BoxClient { public final NotesManager notes; + public final DocumentSplitManager documentSplit; + public final QueryManager query; + public final ShuttleManager shuttle; + public BoxClient(Authentication auth) { this.auth = auth; this.networkSession = new NetworkSession.Builder().baseUrls(new BaseUrls()).build(); @@ -634,8 +640,15 @@ public BoxClient(Authentication auth) { .build(); this.notes = new NotesManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); + this.documentSplit = + new DocumentSplitManager.Builder() + .auth(this.auth) + .networkSession(this.networkSession) + .build(); this.query = new QueryManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); + this.shuttle = + new ShuttleManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); } protected BoxClient(Builder builder) { @@ -993,8 +1006,15 @@ protected BoxClient(Builder builder) { .build(); this.notes = new NotesManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); + this.documentSplit = + new DocumentSplitManager.Builder() + .auth(this.auth) + .networkSession(this.networkSession) + .build(); this.query = new QueryManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); + this.shuttle = + new ShuttleManager.Builder().auth(this.auth).networkSession(this.networkSession).build(); } /** @@ -1458,10 +1478,18 @@ public NotesManager getNotes() { return notes; } + public DocumentSplitManager getDocumentSplit() { + return documentSplit; + } + public QueryManager getQuery() { return query; } + public ShuttleManager getShuttle() { + return shuttle; + } + public static class Builder { protected final Authentication auth; diff --git a/src/main/java/com/box/sdkgen/managers/documentsplit/CreateDocumentSplitV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/documentsplit/CreateDocumentSplitV2026R0Headers.java new file mode 100644 index 000000000..b4e952d94 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/documentsplit/CreateDocumentSplitV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.documentsplit; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateDocumentSplitV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateDocumentSplitV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateDocumentSplitV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateDocumentSplitV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateDocumentSplitV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/documentsplit/DocumentSplitManager.java b/src/main/java/com/box/sdkgen/managers/documentsplit/DocumentSplitManager.java new file mode 100644 index 000000000..978756afb --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/documentsplit/DocumentSplitManager.java @@ -0,0 +1,235 @@ +package com.box.sdkgen.managers.documentsplit; + +import static com.box.sdkgen.internal.utils.UtilsManager.convertToString; +import static com.box.sdkgen.internal.utils.UtilsManager.entryOf; +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; +import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps; +import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams; + +import com.box.sdkgen.networking.auth.Authentication; +import com.box.sdkgen.networking.fetchoptions.FetchOptions; +import com.box.sdkgen.networking.fetchoptions.ResponseFormat; +import com.box.sdkgen.networking.fetchresponse.FetchResponse; +import com.box.sdkgen.networking.network.NetworkSession; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestv2026r0.DocumentSplitCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreateresponsev2026r0.DocumentSplitCreateResponseV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitsv2026r0.DocumentSplitsV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0.DocumentSplitV2026R0; +import com.box.sdkgen.serialization.json.JsonManager; +import java.util.Map; + +public class DocumentSplitManager { + + public Authentication auth; + + public NetworkSession networkSession; + + public DocumentSplitManager() { + this.networkSession = new NetworkSession(); + } + + protected DocumentSplitManager(Builder builder) { + this.auth = builder.auth; + this.networkSession = builder.networkSession; + } + + /** + * Initiates a Document Split job for the supplied source file. The job runs asynchronously; + * clients can poll the returned job ID to track progress. + * + *

All split-specific input lives under `split_input`. When `split_input.split_type` is + * `manual`, provide `split_input.split_definition` (continuous page ranges; `version` may be + * omitted or `v_1`). When `split_input.split_type` is `page_selection`, provide + * `split_input.page_selection` (non-linear page segments; `version` may be omitted or `v_2`). + * `split_input.prompt` must not be provided for either of those variants. When + * `split_input.split_type` is `smart`, `split_input.prompt` is required and neither + * `split_input.split_definition` nor `split_input.page_selection` must be provided. + * + * @param requestBody Request body of createDocumentSplitV2026R0 method + */ + public DocumentSplitCreateResponseV2026R0 createDocumentSplitV2026R0( + DocumentSplitCreateRequestV2026R0 requestBody) { + return createDocumentSplitV2026R0(requestBody, new CreateDocumentSplitV2026R0Headers()); + } + + /** + * Initiates a Document Split job for the supplied source file. The job runs asynchronously; + * clients can poll the returned job ID to track progress. + * + *

All split-specific input lives under `split_input`. When `split_input.split_type` is + * `manual`, provide `split_input.split_definition` (continuous page ranges; `version` may be + * omitted or `v_1`). When `split_input.split_type` is `page_selection`, provide + * `split_input.page_selection` (non-linear page segments; `version` may be omitted or `v_2`). + * `split_input.prompt` must not be provided for either of those variants. When + * `split_input.split_type` is `smart`, `split_input.prompt` is required and neither + * `split_input.split_definition` nor `split_input.page_selection` must be provided. + * + * @param requestBody Request body of createDocumentSplitV2026R0 method + * @param headers Headers of createDocumentSplitV2026R0 method + */ + public DocumentSplitCreateResponseV2026R0 createDocumentSplitV2026R0( + DocumentSplitCreateRequestV2026R0 requestBody, CreateDocumentSplitV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/document_splits"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), DocumentSplitCreateResponseV2026R0.class); + } + + /** Returns a paginated list of Document Split jobs accessible to the authenticated user. */ + public DocumentSplitsV2026R0 getDocumentSplitsV2026R0() { + return getDocumentSplitsV2026R0( + new GetDocumentSplitsV2026R0QueryParams(), new GetDocumentSplitsV2026R0Headers()); + } + + /** + * Returns a paginated list of Document Split jobs accessible to the authenticated user. + * + * @param queryParams Query parameters of getDocumentSplitsV2026R0 method + */ + public DocumentSplitsV2026R0 getDocumentSplitsV2026R0( + GetDocumentSplitsV2026R0QueryParams queryParams) { + return getDocumentSplitsV2026R0(queryParams, new GetDocumentSplitsV2026R0Headers()); + } + + /** + * Returns a paginated list of Document Split jobs accessible to the authenticated user. + * + * @param headers Headers of getDocumentSplitsV2026R0 method + */ + public DocumentSplitsV2026R0 getDocumentSplitsV2026R0(GetDocumentSplitsV2026R0Headers headers) { + return getDocumentSplitsV2026R0(new GetDocumentSplitsV2026R0QueryParams(), headers); + } + + /** + * Returns a paginated list of Document Split jobs accessible to the authenticated user. + * + * @param queryParams Query parameters of getDocumentSplitsV2026R0 method + * @param headers Headers of getDocumentSplitsV2026R0 method + */ + public DocumentSplitsV2026R0 getDocumentSplitsV2026R0( + GetDocumentSplitsV2026R0QueryParams queryParams, GetDocumentSplitsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/document_splits"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), DocumentSplitsV2026R0.class); + } + + /** + * Returns details for a single Document Split job identified by its ID, including the current + * status, the input definition, and any output files produced by the job. + * + * @param documentSplitId The unique identifier for the Document Split job. Example: "1748426" + */ + public DocumentSplitV2026R0 getDocumentSplitByIdV2026R0(String documentSplitId) { + return getDocumentSplitByIdV2026R0(documentSplitId, new GetDocumentSplitByIdV2026R0Headers()); + } + + /** + * Returns details for a single Document Split job identified by its ID, including the current + * status, the input definition, and any output files produced by the job. + * + * @param documentSplitId The unique identifier for the Document Split job. Example: "1748426" + * @param headers Headers of getDocumentSplitByIdV2026R0 method + */ + public DocumentSplitV2026R0 getDocumentSplitByIdV2026R0( + String documentSplitId, GetDocumentSplitByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/document_splits/", + convertToString(documentSplitId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), DocumentSplitV2026R0.class); + } + + public Authentication getAuth() { + return auth; + } + + public NetworkSession getNetworkSession() { + return networkSession; + } + + public static class Builder { + + protected Authentication auth; + + protected NetworkSession networkSession; + + public Builder() {} + + public Builder auth(Authentication auth) { + this.auth = auth; + return this; + } + + public Builder networkSession(NetworkSession networkSession) { + this.networkSession = networkSession; + return this; + } + + public DocumentSplitManager build() { + if (this.networkSession == null) { + this.networkSession = new NetworkSession(); + } + return new DocumentSplitManager(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitByIdV2026R0Headers.java new file mode 100644 index 000000000..4b135473d --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.documentsplit; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetDocumentSplitByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetDocumentSplitByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetDocumentSplitByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetDocumentSplitByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetDocumentSplitByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0Headers.java new file mode 100644 index 000000000..47092d613 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.documentsplit; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetDocumentSplitsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetDocumentSplitsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetDocumentSplitsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetDocumentSplitsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetDocumentSplitsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0QueryParams.java new file mode 100644 index 000000000..a346c9b30 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/documentsplit/GetDocumentSplitsV2026R0QueryParams.java @@ -0,0 +1,51 @@ +package com.box.sdkgen.managers.documentsplit; + +public class GetDocumentSplitsV2026R0QueryParams { + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetDocumentSplitsV2026R0QueryParams() {} + + protected GetDocumentSplitsV2026R0QueryParams(Builder builder) { + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected String marker; + + protected Long limit; + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetDocumentSplitsV2026R0QueryParams build() { + return new GetDocumentSplitsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/events/GetEventStreamQueryParamsEventTypeField.java b/src/main/java/com/box/sdkgen/managers/events/GetEventStreamQueryParamsEventTypeField.java index 718b2aba4..8c9b71f65 100644 --- a/src/main/java/com/box/sdkgen/managers/events/GetEventStreamQueryParamsEventTypeField.java +++ b/src/main/java/com/box/sdkgen/managers/events/GetEventStreamQueryParamsEventTypeField.java @@ -102,6 +102,8 @@ public enum GetEventStreamQueryParamsEventTypeField implements Valuable { RENAME("RENAME"), RETENTION_POLICY_ASSIGNMENT_ADD("RETENTION_POLICY_ASSIGNMENT_ADD"), SHARE("SHARE"), + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS("SHARED_LINK_ONE_TIME_PASSCODE_ACCESS"), + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE("SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE"), SHARED_LINK_SEND("SHARED_LINK_SEND"), SHARE_EXPIRATION("SHARE_EXPIRATION"), SHIELD_ALERT("SHIELD_ALERT"), @@ -109,9 +111,11 @@ public enum GetEventStreamQueryParamsEventTypeField implements Valuable { SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED"), SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION"), + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED("SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION"), + SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED("SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED"), SHIELD_JUSTIFICATION_APPROVAL("SHIELD_JUSTIFICATION_APPROVAL"), SHIELD_PREVIEW_BLOCKED("SHIELD_PREVIEW_BLOCKED"), SHIELD_SHARED_LINK_ACCESS_BLOCKED("SHIELD_SHARED_LINK_ACCESS_BLOCKED"), diff --git a/src/main/java/com/box/sdkgen/managers/events/GetEventsQueryParamsEventTypeField.java b/src/main/java/com/box/sdkgen/managers/events/GetEventsQueryParamsEventTypeField.java index 813e04666..d23cabcc1 100644 --- a/src/main/java/com/box/sdkgen/managers/events/GetEventsQueryParamsEventTypeField.java +++ b/src/main/java/com/box/sdkgen/managers/events/GetEventsQueryParamsEventTypeField.java @@ -102,6 +102,8 @@ public enum GetEventsQueryParamsEventTypeField implements Valuable { RENAME("RENAME"), RETENTION_POLICY_ASSIGNMENT_ADD("RETENTION_POLICY_ASSIGNMENT_ADD"), SHARE("SHARE"), + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS("SHARED_LINK_ONE_TIME_PASSCODE_ACCESS"), + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE("SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE"), SHARED_LINK_SEND("SHARED_LINK_SEND"), SHARE_EXPIRATION("SHARE_EXPIRATION"), SHIELD_ALERT("SHIELD_ALERT"), @@ -109,9 +111,11 @@ public enum GetEventsQueryParamsEventTypeField implements Valuable { SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED"), SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION"), + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED("SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION"), + SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED("SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED"), SHIELD_JUSTIFICATION_APPROVAL("SHIELD_JUSTIFICATION_APPROVAL"), SHIELD_PREVIEW_BLOCKED("SHIELD_PREVIEW_BLOCKED"), SHIELD_SHARED_LINK_ACCESS_BLOCKED("SHIELD_SHARED_LINK_ACCESS_BLOCKED"), diff --git a/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java index 5036d60f8..288b39a1d 100644 --- a/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class UpdateFileByIdRequestBodySharedLinkField extends SerializableObject protected UpdateFileByIdRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateFileByIdRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected UpdateFileByIdRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public UpdateFileByIdRequestBodySharedLinkPermissionsField getPermissions() { return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -112,12 +124,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -142,6 +155,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -157,6 +174,8 @@ public static class Builder extends NullableFieldTracker { protected UpdateFileByIdRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateFileByIdRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -188,6 +207,26 @@ public Builder permissions(UpdateFileByIdRequestBodySharedLinkPermissionsField p return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateFileByIdRequestBodySharedLinkField build() { return new UpdateFileByIdRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/folders/UpdateFolderByIdRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/folders/UpdateFolderByIdRequestBodySharedLinkField.java index 432dd689d..b5c190a7d 100644 --- a/src/main/java/com/box/sdkgen/managers/folders/UpdateFolderByIdRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/folders/UpdateFolderByIdRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class UpdateFolderByIdRequestBodySharedLinkField extends SerializableObje protected UpdateFolderByIdRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateFolderByIdRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected UpdateFolderByIdRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public UpdateFolderByIdRequestBodySharedLinkPermissionsField getPermissions() { return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected UpdateFolderByIdRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateFolderByIdRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -189,6 +208,26 @@ public Builder permissions(UpdateFolderByIdRequestBodySharedLinkPermissionsField return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateFolderByIdRequestBodySharedLinkField build() { return new UpdateFolderByIdRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/AddShareLinkToFileRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/AddShareLinkToFileRequestBodySharedLinkField.java index e777ed4a4..fed620b93 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/AddShareLinkToFileRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/AddShareLinkToFileRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class AddShareLinkToFileRequestBodySharedLinkField extends SerializableOb protected AddShareLinkToFileRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public AddShareLinkToFileRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected AddShareLinkToFileRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public AddShareLinkToFileRequestBodySharedLinkPermissionsField getPermissions() return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected AddShareLinkToFileRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(AddShareLinkToFileRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -190,6 +209,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public AddShareLinkToFileRequestBodySharedLinkField build() { return new AddShareLinkToFileRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/UpdateSharedLinkOnFileRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/UpdateSharedLinkOnFileRequestBodySharedLinkField.java index 574f38374..d3f345bf1 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/UpdateSharedLinkOnFileRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksfiles/UpdateSharedLinkOnFileRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class UpdateSharedLinkOnFileRequestBodySharedLinkField extends Serializab protected UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateSharedLinkOnFileRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected UpdateSharedLinkOnFileRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField getPermission return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateSharedLinkOnFileRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -191,6 +210,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateSharedLinkOnFileRequestBodySharedLinkField build() { return new UpdateSharedLinkOnFileRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/AddShareLinkToFolderRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/AddShareLinkToFolderRequestBodySharedLinkField.java index e27d854da..e4d3ca5d2 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/AddShareLinkToFolderRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/AddShareLinkToFolderRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class AddShareLinkToFolderRequestBodySharedLinkField extends Serializable protected AddShareLinkToFolderRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public AddShareLinkToFolderRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected AddShareLinkToFolderRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public AddShareLinkToFolderRequestBodySharedLinkPermissionsField getPermissions( return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected AddShareLinkToFolderRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(AddShareLinkToFolderRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -191,6 +210,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public AddShareLinkToFolderRequestBodySharedLinkField build() { return new AddShareLinkToFolderRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/UpdateSharedLinkOnFolderRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/UpdateSharedLinkOnFolderRequestBodySharedLinkField.java index 3eb56e05f..6dcbb7e74 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/UpdateSharedLinkOnFolderRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksfolders/UpdateSharedLinkOnFolderRequestBodySharedLinkField.java @@ -3,6 +3,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -64,6 +68,9 @@ public class UpdateSharedLinkOnFolderRequestBodySharedLinkField extends Serializ protected UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateSharedLinkOnFolderRequestBodySharedLinkField() { super(); } @@ -75,6 +82,7 @@ protected UpdateSharedLinkOnFolderRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -98,6 +106,10 @@ public UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField getPermissi return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -112,12 +124,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -142,6 +155,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -157,6 +174,8 @@ public static class Builder extends NullableFieldTracker { protected UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateSharedLinkOnFolderRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); @@ -190,6 +209,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateSharedLinkOnFolderRequestBodySharedLinkField build() { return new UpdateSharedLinkOnFolderRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/AddShareLinkToWebLinkRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/AddShareLinkToWebLinkRequestBodySharedLinkField.java index 381060bb8..4bea28289 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/AddShareLinkToWebLinkRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/AddShareLinkToWebLinkRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class AddShareLinkToWebLinkRequestBodySharedLinkField extends Serializabl protected AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public AddShareLinkToWebLinkRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected AddShareLinkToWebLinkRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField getPermissions return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(AddShareLinkToWebLinkRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -191,6 +210,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public AddShareLinkToWebLinkRequestBodySharedLinkField build() { return new AddShareLinkToWebLinkRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/UpdateSharedLinkOnWebLinkRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/UpdateSharedLinkOnWebLinkRequestBodySharedLinkField.java index 619ad3772..ee20f1936 100644 --- a/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/UpdateSharedLinkOnWebLinkRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/sharedlinksweblinks/UpdateSharedLinkOnWebLinkRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -65,6 +69,9 @@ public class UpdateSharedLinkOnWebLinkRequestBodySharedLinkField extends Seriali protected UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField permissions; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateSharedLinkOnWebLinkRequestBodySharedLinkField() { super(); } @@ -76,6 +83,7 @@ protected UpdateSharedLinkOnWebLinkRequestBodySharedLinkField(Builder builder) { this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; this.permissions = builder.permissions; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -99,6 +107,10 @@ public UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField getPermiss return permissions; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -113,12 +125,13 @@ public boolean equals(Object o) { && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) && Objects.equals(unsharedAt, casted.unsharedAt) - && Objects.equals(permissions, casted.permissions); + && Objects.equals(permissions, casted.permissions) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt, permissions); + return Objects.hash(access, password, vanityName, unsharedAt, permissions, oneTimePasscode); } @Override @@ -143,6 +156,10 @@ public String toString() { + "permissions='" + permissions + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -158,6 +175,8 @@ public static class Builder extends NullableFieldTracker { protected UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField permissions; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateSharedLinkOnWebLinkRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); @@ -192,6 +211,26 @@ public Builder permissions( return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateSharedLinkOnWebLinkRequestBodySharedLinkField build() { return new UpdateSharedLinkOnWebLinkRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobPrepareMigrationV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobPrepareMigrationV2026R0Headers.java new file mode 100644 index 000000000..e4641b645 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobPrepareMigrationV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleJobPrepareMigrationV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleJobPrepareMigrationV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleJobPrepareMigrationV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleJobPrepareMigrationV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleJobPrepareMigrationV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobScheduleV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobScheduleV2026R0Headers.java new file mode 100644 index 000000000..795b71dd7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobScheduleV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleJobScheduleV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleJobScheduleV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleJobScheduleV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleJobScheduleV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleJobScheduleV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStartV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStartV2026R0Headers.java new file mode 100644 index 000000000..5dd1f417e --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStartV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleJobStartV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleJobStartV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleJobStartV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleJobStartV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleJobStartV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStopV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStopV2026R0Headers.java new file mode 100644 index 000000000..f7ccb5ad0 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobStopV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleJobStopV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleJobStopV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleJobStopV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleJobStopV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleJobStopV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobV2026R0Headers.java new file mode 100644 index 000000000..0e103d5ae --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleJobV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleJobV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleJobV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleJobV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleJobV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleJobV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingImportV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingImportV2026R0Headers.java new file mode 100644 index 000000000..d2bfd55a3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingImportV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttlePathMappingImportV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttlePathMappingImportV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttlePathMappingImportV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttlePathMappingImportV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttlePathMappingImportV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingV2026R0Headers.java new file mode 100644 index 000000000..5545fad7a --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttlePathMappingV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttlePathMappingV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttlePathMappingV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttlePathMappingV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttlePathMappingV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttlePathMappingV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleReportV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleReportV2026R0Headers.java new file mode 100644 index 000000000..d761d79fb --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleReportV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleReportV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleReportV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleReportV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleReportV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleReportV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingImportV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingImportV2026R0Headers.java new file mode 100644 index 000000000..e061a805d --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingImportV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleSubjectMappingImportV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleSubjectMappingImportV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleSubjectMappingImportV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleSubjectMappingImportV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleSubjectMappingImportV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingV2026R0Headers.java new file mode 100644 index 000000000..92b3f0ad3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSubjectMappingV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleSubjectMappingV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleSubjectMappingV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleSubjectMappingV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleSubjectMappingV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleSubjectMappingV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemIssueRegistrationTokenV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemIssueRegistrationTokenV2026R0Headers.java new file mode 100644 index 000000000..3882c7c88 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemIssueRegistrationTokenV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleSystemIssueRegistrationTokenV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleSystemIssueRegistrationTokenV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleSystemIssueRegistrationTokenV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleSystemIssueRegistrationTokenV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleSystemIssueRegistrationTokenV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemV2026R0Headers.java new file mode 100644 index 000000000..d32705ced --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/CreateShuttleSystemV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class CreateShuttleSystemV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public CreateShuttleSystemV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected CreateShuttleSystemV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public CreateShuttleSystemV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new CreateShuttleSystemV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobByIdV2026R0Headers.java new file mode 100644 index 000000000..dcb1a7c04 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class DeleteShuttleJobByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public DeleteShuttleJobByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected DeleteShuttleJobByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public DeleteShuttleJobByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new DeleteShuttleJobByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobScheduleByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobScheduleByIdV2026R0Headers.java new file mode 100644 index 000000000..621db5b8d --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleJobScheduleByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class DeleteShuttleJobScheduleByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public DeleteShuttleJobScheduleByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected DeleteShuttleJobScheduleByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public DeleteShuttleJobScheduleByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new DeleteShuttleJobScheduleByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttlePathMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttlePathMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..4eb527cab --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttlePathMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class DeleteShuttlePathMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public DeleteShuttlePathMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected DeleteShuttlePathMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public DeleteShuttlePathMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new DeleteShuttlePathMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSubjectMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSubjectMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..8cd87a7d3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSubjectMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class DeleteShuttleSubjectMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public DeleteShuttleSubjectMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected DeleteShuttleSubjectMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public DeleteShuttleSubjectMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new DeleteShuttleSubjectMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSystemByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSystemByIdV2026R0Headers.java new file mode 100644 index 000000000..748e44fba --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/DeleteShuttleSystemByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class DeleteShuttleSystemByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public DeleteShuttleSystemByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected DeleteShuttleSystemByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public DeleteShuttleSystemByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new DeleteShuttleSystemByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0Headers.java new file mode 100644 index 000000000..673e84a32 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleDiscoveredSubjectsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleDiscoveredSubjectsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleDiscoveredSubjectsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleDiscoveredSubjectsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleDiscoveredSubjectsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0QueryParams.java new file mode 100644 index 000000000..72d2878fb --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleDiscoveredSubjectsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleDiscoveredSubjectsV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose discovered subjects to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleDiscoveredSubjectsV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttleDiscoveredSubjectsV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleDiscoveredSubjectsV2026R0QueryParams build() { + return new GetShuttleDiscoveredSubjectsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobByIdV2026R0Headers.java new file mode 100644 index 000000000..87a18c330 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleJobByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleJobByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleJobByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleJobByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleJobByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobScheduleByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobScheduleByIdV2026R0Headers.java new file mode 100644 index 000000000..b3820000f --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobScheduleByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleJobScheduleByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleJobScheduleByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleJobScheduleByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleJobScheduleByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleJobScheduleByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0Headers.java new file mode 100644 index 000000000..cfc2c7f03 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleJobSchedulesV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleJobSchedulesV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleJobSchedulesV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleJobSchedulesV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleJobSchedulesV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0QueryParams.java new file mode 100644 index 000000000..8023a516e --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobSchedulesV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleJobSchedulesV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose schedules to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleJobSchedulesV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttleJobSchedulesV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleJobSchedulesV2026R0QueryParams build() { + return new GetShuttleJobSchedulesV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0Headers.java new file mode 100644 index 000000000..83d6863eb --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleJobsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleJobsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleJobsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleJobsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleJobsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0QueryParams.java new file mode 100644 index 000000000..c20c945d7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleJobsV2026R0QueryParams.java @@ -0,0 +1,51 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleJobsV2026R0QueryParams { + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleJobsV2026R0QueryParams() {} + + protected GetShuttleJobsV2026R0QueryParams(Builder builder) { + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected String marker; + + protected Long limit; + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleJobsV2026R0QueryParams build() { + return new GetShuttleJobsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0Headers.java new file mode 100644 index 000000000..eca6085bc --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleMappingErrorsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleMappingErrorsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleMappingErrorsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleMappingErrorsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleMappingErrorsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0QueryParams.java new file mode 100644 index 000000000..105a5433f --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleMappingErrorsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleMappingErrorsV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose mapping errors to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleMappingErrorsV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttleMappingErrorsV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleMappingErrorsV2026R0QueryParams build() { + return new GetShuttleMappingErrorsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0Headers.java new file mode 100644 index 000000000..b3d66284a --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttlePathEntriesV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttlePathEntriesV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttlePathEntriesV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttlePathEntriesV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttlePathEntriesV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParams.java new file mode 100644 index 000000000..a704b1818 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParams.java @@ -0,0 +1,149 @@ +package com.box.sdkgen.managers.shuttle; + +import com.box.sdkgen.serialization.json.EnumWrapper; + +public class GetShuttlePathEntriesV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose path entries to list. */ + public final String jobId; + + /** The side of the migration to browse. */ + public final EnumWrapper side; + + /** + * The human-readable parent path whose children are returned. This can be used with or without + * `path_id`. Omit both, or pass `/` as `path`, to list root entries. + */ + public String path; + + /** + * The `path_id` value of the parent entry whose children are returned. This can be used with or + * without `path`. It distinguishes paths with identical names on systems that support stable + * identifiers. + */ + public String pathId; + + /** + * The email of the account whose path entries are returned. This is a system-native identifier + * and is not always an RFC 5322 address. + */ + public String accountEmail; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttlePathEntriesV2026R0QueryParams( + String jobId, GetShuttlePathEntriesV2026R0QueryParamsSideField side) { + this.jobId = jobId; + this.side = new EnumWrapper(side); + } + + public GetShuttlePathEntriesV2026R0QueryParams( + String jobId, EnumWrapper side) { + this.jobId = jobId; + this.side = side; + } + + protected GetShuttlePathEntriesV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.side = builder.side; + this.path = builder.path; + this.pathId = builder.pathId; + this.accountEmail = builder.accountEmail; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public EnumWrapper getSide() { + return side; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public String getAccountEmail() { + return accountEmail; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected final EnumWrapper side; + + protected String path; + + protected String pathId; + + protected String accountEmail; + + protected String marker; + + protected Long limit; + + public Builder(String jobId, GetShuttlePathEntriesV2026R0QueryParamsSideField side) { + this.jobId = jobId; + this.side = new EnumWrapper(side); + } + + public Builder( + String jobId, EnumWrapper side) { + this.jobId = jobId; + this.side = side; + } + + public Builder path(String path) { + this.path = path; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + return this; + } + + public Builder accountEmail(String accountEmail) { + this.accountEmail = accountEmail; + return this; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttlePathEntriesV2026R0QueryParams build() { + return new GetShuttlePathEntriesV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParamsSideField.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParamsSideField.java new file mode 100644 index 000000000..858a0b964 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathEntriesV2026R0QueryParamsSideField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.managers.shuttle; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum GetShuttlePathEntriesV2026R0QueryParamsSideField implements Valuable { + SOURCE("source"), + TARGET("target"); + + private final String value; + + GetShuttlePathEntriesV2026R0QueryParamsSideField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class GetShuttlePathEntriesV2026R0QueryParamsSideFieldDeserializer + extends JsonDeserializer> { + + public GetShuttlePathEntriesV2026R0QueryParamsSideFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(GetShuttlePathEntriesV2026R0QueryParamsSideField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class GetShuttlePathEntriesV2026R0QueryParamsSideFieldSerializer + extends JsonSerializer> { + + public GetShuttlePathEntriesV2026R0QueryParamsSideFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..5b124b312 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttlePathMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttlePathMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttlePathMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttlePathMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttlePathMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0Headers.java new file mode 100644 index 000000000..0ab5151a4 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttlePathMappingsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttlePathMappingsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttlePathMappingsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttlePathMappingsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttlePathMappingsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0QueryParams.java new file mode 100644 index 000000000..fdec8bcd2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttlePathMappingsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttlePathMappingsV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose path mappings to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttlePathMappingsV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttlePathMappingsV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttlePathMappingsV2026R0QueryParams build() { + return new GetShuttlePathMappingsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportByIdV2026R0Headers.java new file mode 100644 index 000000000..29bed1828 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleReportByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleReportByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleReportByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleReportByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleReportByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0Headers.java new file mode 100644 index 000000000..b6ab15739 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleReportsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleReportsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleReportsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleReportsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleReportsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0QueryParams.java new file mode 100644 index 000000000..08f8dbf30 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleReportsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleReportsV2026R0QueryParams { + + /** The unique identifier of the shuttle run whose reports to list. */ + public final String runId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleReportsV2026R0QueryParams(String runId) { + this.runId = runId; + } + + protected GetShuttleReportsV2026R0QueryParams(Builder builder) { + this.runId = builder.runId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getRunId() { + return runId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String runId; + + protected String marker; + + protected Long limit; + + public Builder(String runId) { + this.runId = runId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleReportsV2026R0QueryParams build() { + return new GetShuttleReportsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunByIdV2026R0Headers.java new file mode 100644 index 000000000..011e1d173 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleRunByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleRunByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleRunByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleRunByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleRunByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0Headers.java new file mode 100644 index 000000000..c5fc505fc --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleRunsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleRunsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleRunsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleRunsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleRunsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0QueryParams.java new file mode 100644 index 000000000..aebec54e6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleRunsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleRunsV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose runs to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleRunsV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttleRunsV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleRunsV2026R0QueryParams build() { + return new GetShuttleRunsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..d80c72500 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleSubjectMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleSubjectMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleSubjectMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleSubjectMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleSubjectMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0Headers.java new file mode 100644 index 000000000..fa1dc00f4 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleSubjectMappingsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleSubjectMappingsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleSubjectMappingsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleSubjectMappingsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleSubjectMappingsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0QueryParams.java new file mode 100644 index 000000000..6ae863084 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSubjectMappingsV2026R0QueryParams.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleSubjectMappingsV2026R0QueryParams { + + /** The unique identifier of the shuttle job whose subject mappings to list. */ + public final String jobId; + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleSubjectMappingsV2026R0QueryParams(String jobId) { + this.jobId = jobId; + } + + protected GetShuttleSubjectMappingsV2026R0QueryParams(Builder builder) { + this.jobId = builder.jobId; + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getJobId() { + return jobId; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected final String jobId; + + protected String marker; + + protected Long limit; + + public Builder(String jobId) { + this.jobId = jobId; + } + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleSubjectMappingsV2026R0QueryParams build() { + return new GetShuttleSubjectMappingsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemByIdV2026R0Headers.java new file mode 100644 index 000000000..f108930ec --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleSystemByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleSystemByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleSystemByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleSystemByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleSystemByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0Headers.java new file mode 100644 index 000000000..2489d4977 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class GetShuttleSystemsV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public GetShuttleSystemsV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected GetShuttleSystemsV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public GetShuttleSystemsV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new GetShuttleSystemsV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0QueryParams.java b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0QueryParams.java new file mode 100644 index 000000000..a4f5f6957 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/GetShuttleSystemsV2026R0QueryParams.java @@ -0,0 +1,51 @@ +package com.box.sdkgen.managers.shuttle; + +public class GetShuttleSystemsV2026R0QueryParams { + + /** + * Defines the position marker at which to begin returning results. This is used when paginating + * using marker-based pagination. + * + *

This requires `usemarker` to be set to `true`. + */ + public String marker; + + /** The maximum number of items to return per page. */ + public Long limit; + + public GetShuttleSystemsV2026R0QueryParams() {} + + protected GetShuttleSystemsV2026R0QueryParams(Builder builder) { + this.marker = builder.marker; + this.limit = builder.limit; + } + + public String getMarker() { + return marker; + } + + public Long getLimit() { + return limit; + } + + public static class Builder { + + protected String marker; + + protected Long limit; + + public Builder marker(String marker) { + this.marker = marker; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public GetShuttleSystemsV2026R0QueryParams build() { + return new GetShuttleSystemsV2026R0QueryParams(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/ShuttleManager.java b/src/main/java/com/box/sdkgen/managers/shuttle/ShuttleManager.java new file mode 100644 index 000000000..8bd7fe435 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/ShuttleManager.java @@ -0,0 +1,2075 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.convertToString; +import static com.box.sdkgen.internal.utils.UtilsManager.entryOf; +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; +import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps; +import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams; + +import com.box.sdkgen.networking.auth.Authentication; +import com.box.sdkgen.networking.fetchoptions.FetchOptions; +import com.box.sdkgen.networking.fetchoptions.ResponseFormat; +import com.box.sdkgen.networking.fetchresponse.FetchResponse; +import com.box.sdkgen.networking.network.NetworkSession; +import com.box.sdkgen.schemas.v2026r0.shuttleagentcredentialsv2026r0.ShuttleAgentCredentialsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlediscoveredsubjectsv2026r0.ShuttleDiscoveredSubjectsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobcreaterequestv2026r0.ShuttleJobCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobschedulecreaterequestv2026r0.ShuttleJobScheduleCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobschedulesv2026r0.ShuttleJobSchedulesV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduleupdaterequestv2026r0.ShuttleJobScheduleUpdateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0.ShuttleJobScheduleV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobstartrequestv2026r0.ShuttleJobStartRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobsv2026r0.ShuttleJobsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobupdaterequestv2026r0.ShuttleJobUpdateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0.ShuttleJobV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlemappingerrorsv2026r0.ShuttleMappingErrorsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentriesv2026r0.ShuttlePathEntriesV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingcreaterequestv2026r0.ShuttlePathMappingCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingimportcreaterequestv2026r0.ShuttlePathMappingImportCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsv2026r0.ShuttlePathMappingsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingupdaterequestv2026r0.ShuttlePathMappingUpdateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingv2026r0.ShuttlePathMappingV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlereportcreaterequestv2026r0.ShuttleReportCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlereportsv2026r0.ShuttleReportsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0.ShuttleReportV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlerunsv2026r0.ShuttleRunsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlerunv2026r0.ShuttleRunV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingcreaterequestv2026r0.ShuttleSubjectMappingCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingimportcreaterequestv2026r0.ShuttleSubjectMappingImportCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingsv2026r0.ShuttleSubjectMappingsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingupdaterequestv2026r0.ShuttleSubjectMappingUpdateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingv2026r0.ShuttleSubjectMappingV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesystemcreaterequestv2026r0.ShuttleSystemCreateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesystemsv2026r0.ShuttleSystemsV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesystemupdaterequestv2026r0.ShuttleSystemUpdateRequestV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlesystemv2026r0.ShuttleSystemV2026R0; +import com.box.sdkgen.serialization.json.JsonManager; +import java.util.Map; + +public class ShuttleManager { + + public Authentication auth; + + public NetworkSession networkSession; + + public ShuttleManager() { + this.networkSession = new NetworkSession(); + } + + protected ShuttleManager(Builder builder) { + this.auth = builder.auth; + this.networkSession = builder.networkSession; + } + + /** Returns a paginated list of shuttle systems accessible to the authenticated user. */ + public ShuttleSystemsV2026R0 getShuttleSystemsV2026R0() { + return getShuttleSystemsV2026R0( + new GetShuttleSystemsV2026R0QueryParams(), new GetShuttleSystemsV2026R0Headers()); + } + + /** + * Returns a paginated list of shuttle systems accessible to the authenticated user. + * + * @param queryParams Query parameters of getShuttleSystemsV2026R0 method + */ + public ShuttleSystemsV2026R0 getShuttleSystemsV2026R0( + GetShuttleSystemsV2026R0QueryParams queryParams) { + return getShuttleSystemsV2026R0(queryParams, new GetShuttleSystemsV2026R0Headers()); + } + + /** + * Returns a paginated list of shuttle systems accessible to the authenticated user. + * + * @param headers Headers of getShuttleSystemsV2026R0 method + */ + public ShuttleSystemsV2026R0 getShuttleSystemsV2026R0(GetShuttleSystemsV2026R0Headers headers) { + return getShuttleSystemsV2026R0(new GetShuttleSystemsV2026R0QueryParams(), headers); + } + + /** + * Returns a paginated list of shuttle systems accessible to the authenticated user. + * + * @param queryParams Query parameters of getShuttleSystemsV2026R0 method + * @param headers Headers of getShuttleSystemsV2026R0 method + */ + public ShuttleSystemsV2026R0 getShuttleSystemsV2026R0( + GetShuttleSystemsV2026R0QueryParams queryParams, GetShuttleSystemsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSystemsV2026R0.class); + } + + /** + * Creates a new shuttle system. Only Windows agent systems can be created through the public API; + * other system types must be configured through the Shuttle application. + * + * @param requestBody Request body of createShuttleSystemV2026R0 method + */ + public ShuttleSystemV2026R0 createShuttleSystemV2026R0( + ShuttleSystemCreateRequestV2026R0 requestBody) { + return createShuttleSystemV2026R0(requestBody, new CreateShuttleSystemV2026R0Headers()); + } + + /** + * Creates a new shuttle system. Only Windows agent systems can be created through the public API; + * other system types must be configured through the Shuttle application. + * + * @param requestBody Request body of createShuttleSystemV2026R0 method + * @param headers Headers of createShuttleSystemV2026R0 method + */ + public ShuttleSystemV2026R0 createShuttleSystemV2026R0( + ShuttleSystemCreateRequestV2026R0 requestBody, CreateShuttleSystemV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSystemV2026R0.class); + } + + /** + * Returns details for a single shuttle system identified by its ID, including its type and + * connection state. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + */ + public ShuttleSystemV2026R0 getShuttleSystemByIdV2026R0(String shuttleSystemId) { + return getShuttleSystemByIdV2026R0(shuttleSystemId, new GetShuttleSystemByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle system identified by its ID, including its type and + * connection state. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + * @param headers Headers of getShuttleSystemByIdV2026R0 method + */ + public ShuttleSystemV2026R0 getShuttleSystemByIdV2026R0( + String shuttleSystemId, GetShuttleSystemByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems/", + convertToString(shuttleSystemId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSystemV2026R0.class); + } + + /** + * Updates the mutable properties of an existing shuttle system identified by its ID. Only the + * fields supplied in the request body are changed. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + * @param requestBody Request body of updateShuttleSystemByIdV2026R0 method + */ + public ShuttleSystemV2026R0 updateShuttleSystemByIdV2026R0( + String shuttleSystemId, ShuttleSystemUpdateRequestV2026R0 requestBody) { + return updateShuttleSystemByIdV2026R0( + shuttleSystemId, requestBody, new UpdateShuttleSystemByIdV2026R0Headers()); + } + + /** + * Updates the mutable properties of an existing shuttle system identified by its ID. Only the + * fields supplied in the request body are changed. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + * @param requestBody Request body of updateShuttleSystemByIdV2026R0 method + * @param headers Headers of updateShuttleSystemByIdV2026R0 method + */ + public ShuttleSystemV2026R0 updateShuttleSystemByIdV2026R0( + String shuttleSystemId, + ShuttleSystemUpdateRequestV2026R0 requestBody, + UpdateShuttleSystemByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems/", + convertToString(shuttleSystemId)), + "PUT") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSystemV2026R0.class); + } + + /** + * Permanently deletes the shuttle system identified by its ID. This does not affect content that + * has already been migrated. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + */ + public void deleteShuttleSystemByIdV2026R0(String shuttleSystemId) { + deleteShuttleSystemByIdV2026R0(shuttleSystemId, new DeleteShuttleSystemByIdV2026R0Headers()); + } + + /** + * Permanently deletes the shuttle system identified by its ID. This does not affect content that + * has already been migrated. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + * @param headers Headers of deleteShuttleSystemByIdV2026R0 method + */ + public void deleteShuttleSystemByIdV2026R0( + String shuttleSystemId, DeleteShuttleSystemByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems/", + convertToString(shuttleSystemId)), + "DELETE") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Issues a new installation token for the Windows shuttle system identified by its ID. Paste the + * returned token into the Windows agent installer to register the agent with this system. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + */ + public ShuttleAgentCredentialsV2026R0 createShuttleSystemIssueRegistrationTokenV2026R0( + String shuttleSystemId) { + return createShuttleSystemIssueRegistrationTokenV2026R0( + shuttleSystemId, new CreateShuttleSystemIssueRegistrationTokenV2026R0Headers()); + } + + /** + * Issues a new installation token for the Windows shuttle system identified by its ID. Paste the + * returned token into the Windows agent installer to register the agent with this system. + * + * @param shuttleSystemId The unique identifier for the shuttle system. Example: + * "6a315c0754833bfc5df067bf" + * @param headers Headers of createShuttleSystemIssueRegistrationTokenV2026R0 method + */ + public ShuttleAgentCredentialsV2026R0 createShuttleSystemIssueRegistrationTokenV2026R0( + String shuttleSystemId, CreateShuttleSystemIssueRegistrationTokenV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_systems/", + convertToString(shuttleSystemId), + "/issue_registration_token"), + "POST") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleAgentCredentialsV2026R0.class); + } + + /** Returns a paginated list of shuttle jobs accessible to the authenticated user. */ + public ShuttleJobsV2026R0 getShuttleJobsV2026R0() { + return getShuttleJobsV2026R0( + new GetShuttleJobsV2026R0QueryParams(), new GetShuttleJobsV2026R0Headers()); + } + + /** + * Returns a paginated list of shuttle jobs accessible to the authenticated user. + * + * @param queryParams Query parameters of getShuttleJobsV2026R0 method + */ + public ShuttleJobsV2026R0 getShuttleJobsV2026R0(GetShuttleJobsV2026R0QueryParams queryParams) { + return getShuttleJobsV2026R0(queryParams, new GetShuttleJobsV2026R0Headers()); + } + + /** + * Returns a paginated list of shuttle jobs accessible to the authenticated user. + * + * @param headers Headers of getShuttleJobsV2026R0 method + */ + public ShuttleJobsV2026R0 getShuttleJobsV2026R0(GetShuttleJobsV2026R0Headers headers) { + return getShuttleJobsV2026R0(new GetShuttleJobsV2026R0QueryParams(), headers); + } + + /** + * Returns a paginated list of shuttle jobs accessible to the authenticated user. + * + * @param queryParams Query parameters of getShuttleJobsV2026R0 method + * @param headers Headers of getShuttleJobsV2026R0 method + */ + public ShuttleJobsV2026R0 getShuttleJobsV2026R0( + GetShuttleJobsV2026R0QueryParams queryParams, GetShuttleJobsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobsV2026R0.class); + } + + /** + * Creates a new shuttle job that describes a migration from the given source system into Box. + * + * @param requestBody Request body of createShuttleJobV2026R0 method + */ + public ShuttleJobV2026R0 createShuttleJobV2026R0(ShuttleJobCreateRequestV2026R0 requestBody) { + return createShuttleJobV2026R0(requestBody, new CreateShuttleJobV2026R0Headers()); + } + + /** + * Creates a new shuttle job that describes a migration from the given source system into Box. + * + * @param requestBody Request body of createShuttleJobV2026R0 method + * @param headers Headers of createShuttleJobV2026R0 method + */ + public ShuttleJobV2026R0 createShuttleJobV2026R0( + ShuttleJobCreateRequestV2026R0 requestBody, CreateShuttleJobV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobV2026R0.class); + } + + /** + * Returns details for a single shuttle job identified by its ID, including its current state, + * mapping-preparation state, and configured source system. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + */ + public ShuttleJobV2026R0 getShuttleJobByIdV2026R0(String shuttleJobId) { + return getShuttleJobByIdV2026R0(shuttleJobId, new GetShuttleJobByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle job identified by its ID, including its current state, + * mapping-preparation state, and configured source system. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param headers Headers of getShuttleJobByIdV2026R0 method + */ + public ShuttleJobV2026R0 getShuttleJobByIdV2026R0( + String shuttleJobId, GetShuttleJobByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobV2026R0.class); + } + + /** + * Updates the mutable properties of an existing shuttle job identified by its ID. Only the fields + * supplied in the request body are changed. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param requestBody Request body of updateShuttleJobByIdV2026R0 method + */ + public ShuttleJobV2026R0 updateShuttleJobByIdV2026R0( + String shuttleJobId, ShuttleJobUpdateRequestV2026R0 requestBody) { + return updateShuttleJobByIdV2026R0( + shuttleJobId, requestBody, new UpdateShuttleJobByIdV2026R0Headers()); + } + + /** + * Updates the mutable properties of an existing shuttle job identified by its ID. Only the fields + * supplied in the request body are changed. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param requestBody Request body of updateShuttleJobByIdV2026R0 method + * @param headers Headers of updateShuttleJobByIdV2026R0 method + */ + public ShuttleJobV2026R0 updateShuttleJobByIdV2026R0( + String shuttleJobId, + ShuttleJobUpdateRequestV2026R0 requestBody, + UpdateShuttleJobByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId)), + "PUT") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobV2026R0.class); + } + + /** + * Permanently deletes the shuttle job identified by its ID. This does not affect content that has + * already been migrated. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + */ + public void deleteShuttleJobByIdV2026R0(String shuttleJobId) { + deleteShuttleJobByIdV2026R0(shuttleJobId, new DeleteShuttleJobByIdV2026R0Headers()); + } + + /** + * Permanently deletes the shuttle job identified by its ID. This does not affect content that has + * already been migrated. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param headers Headers of deleteShuttleJobByIdV2026R0 method + */ + public void deleteShuttleJobByIdV2026R0( + String shuttleJobId, DeleteShuttleJobByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId)), + "DELETE") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Starts the job in the given mode. When no body is provided the job runs in simulation mode. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + */ + public void createShuttleJobStartV2026R0(String shuttleJobId) { + createShuttleJobStartV2026R0(shuttleJobId, null, new CreateShuttleJobStartV2026R0Headers()); + } + + /** + * Starts the job in the given mode. When no body is provided the job runs in simulation mode. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param requestBody Request body of createShuttleJobStartV2026R0 method + */ + public void createShuttleJobStartV2026R0( + String shuttleJobId, ShuttleJobStartRequestV2026R0 requestBody) { + createShuttleJobStartV2026R0( + shuttleJobId, requestBody, new CreateShuttleJobStartV2026R0Headers()); + } + + /** + * Starts the job in the given mode. When no body is provided the job runs in simulation mode. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param headers Headers of createShuttleJobStartV2026R0 method + */ + public void createShuttleJobStartV2026R0( + String shuttleJobId, CreateShuttleJobStartV2026R0Headers headers) { + createShuttleJobStartV2026R0(shuttleJobId, null, headers); + } + + /** + * Starts the job in the given mode. When no body is provided the job runs in simulation mode. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param requestBody Request body of createShuttleJobStartV2026R0 method + * @param headers Headers of createShuttleJobStartV2026R0 method + */ + public void createShuttleJobStartV2026R0( + String shuttleJobId, + ShuttleJobStartRequestV2026R0 requestBody, + CreateShuttleJobStartV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId), + "/start"), + "POST") + .headers(headersMap) + .data((!(requestBody == null) ? JsonManager.serialize(requestBody) : null)) + .contentType("application/json") + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Stops a running shuttle job identified by its ID. Any work already in progress is allowed to + * finish before the job transitions to a stopped state. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + */ + public void createShuttleJobStopV2026R0(String shuttleJobId) { + createShuttleJobStopV2026R0(shuttleJobId, new CreateShuttleJobStopV2026R0Headers()); + } + + /** + * Stops a running shuttle job identified by its ID. Any work already in progress is allowed to + * finish before the job transitions to a stopped state. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param headers Headers of createShuttleJobStopV2026R0 method + */ + public void createShuttleJobStopV2026R0( + String shuttleJobId, CreateShuttleJobStopV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId), + "/stop"), + "POST") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Validates the configured account and path mappings before a transfer. Only relevant when + * account mapping is enabled. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + */ + public void createShuttleJobPrepareMigrationV2026R0(String shuttleJobId) { + createShuttleJobPrepareMigrationV2026R0( + shuttleJobId, new CreateShuttleJobPrepareMigrationV2026R0Headers()); + } + + /** + * Validates the configured account and path mappings before a transfer. Only relevant when + * account mapping is enabled. + * + * @param shuttleJobId The unique identifier for the shuttle job. Example: + * "6a3ba68e810d9156194530a1" + * @param headers Headers of createShuttleJobPrepareMigrationV2026R0 method + */ + public void createShuttleJobPrepareMigrationV2026R0( + String shuttleJobId, CreateShuttleJobPrepareMigrationV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_jobs/", + convertToString(shuttleJobId), + "/prepare_migration"), + "POST") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Returns a paginated list of runs for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleRunsV2026R0 method + */ + public ShuttleRunsV2026R0 getShuttleRunsV2026R0(GetShuttleRunsV2026R0QueryParams queryParams) { + return getShuttleRunsV2026R0(queryParams, new GetShuttleRunsV2026R0Headers()); + } + + /** + * Returns a paginated list of runs for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleRunsV2026R0 method + * @param headers Headers of getShuttleRunsV2026R0 method + */ + public ShuttleRunsV2026R0 getShuttleRunsV2026R0( + GetShuttleRunsV2026R0QueryParams queryParams, GetShuttleRunsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_runs"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleRunsV2026R0.class); + } + + /** + * Returns details for a single shuttle run identified by its ID, including its mode, state, + * timing, and transfer statistics. + * + * @param shuttleRunId The unique identifier for the shuttle run, in the form + * `{job_id}:{run_number}`. Example: "6a3ba68e810d9156194530a1:42" + */ + public ShuttleRunV2026R0 getShuttleRunByIdV2026R0(String shuttleRunId) { + return getShuttleRunByIdV2026R0(shuttleRunId, new GetShuttleRunByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle run identified by its ID, including its mode, state, + * timing, and transfer statistics. + * + * @param shuttleRunId The unique identifier for the shuttle run, in the form + * `{job_id}:{run_number}`. Example: "6a3ba68e810d9156194530a1:42" + * @param headers Headers of getShuttleRunByIdV2026R0 method + */ + public ShuttleRunV2026R0 getShuttleRunByIdV2026R0( + String shuttleRunId, GetShuttleRunByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_runs/", + convertToString(shuttleRunId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleRunV2026R0.class); + } + + /** + * Returns a paginated list of schedules for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleJobSchedulesV2026R0 method + */ + public ShuttleJobSchedulesV2026R0 getShuttleJobSchedulesV2026R0( + GetShuttleJobSchedulesV2026R0QueryParams queryParams) { + return getShuttleJobSchedulesV2026R0(queryParams, new GetShuttleJobSchedulesV2026R0Headers()); + } + + /** + * Returns a paginated list of schedules for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleJobSchedulesV2026R0 method + * @param headers Headers of getShuttleJobSchedulesV2026R0 method + */ + public ShuttleJobSchedulesV2026R0 getShuttleJobSchedulesV2026R0( + GetShuttleJobSchedulesV2026R0QueryParams queryParams, + GetShuttleJobSchedulesV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_job_schedules"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobSchedulesV2026R0.class); + } + + /** + * Creates a schedule that starts runs of the shuttle job identified by `job_id`. The schedule + * starts a run either at a wall-clock time or after another job's run meets a condition. + * Schedules cannot start a run in `scan` mode. + * + * @param requestBody Request body of createShuttleJobScheduleV2026R0 method + */ + public ShuttleJobScheduleV2026R0 createShuttleJobScheduleV2026R0( + ShuttleJobScheduleCreateRequestV2026R0 requestBody) { + return createShuttleJobScheduleV2026R0( + requestBody, new CreateShuttleJobScheduleV2026R0Headers()); + } + + /** + * Creates a schedule that starts runs of the shuttle job identified by `job_id`. The schedule + * starts a run either at a wall-clock time or after another job's run meets a condition. + * Schedules cannot start a run in `scan` mode. + * + * @param requestBody Request body of createShuttleJobScheduleV2026R0 method + * @param headers Headers of createShuttleJobScheduleV2026R0 method + */ + public ShuttleJobScheduleV2026R0 createShuttleJobScheduleV2026R0( + ShuttleJobScheduleCreateRequestV2026R0 requestBody, + CreateShuttleJobScheduleV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_job_schedules"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobScheduleV2026R0.class); + } + + /** + * Retrieves the shuttle job schedule identified by its ID. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + */ + public ShuttleJobScheduleV2026R0 getShuttleJobScheduleByIdV2026R0(String shuttleJobScheduleId) { + return getShuttleJobScheduleByIdV2026R0( + shuttleJobScheduleId, new GetShuttleJobScheduleByIdV2026R0Headers()); + } + + /** + * Retrieves the shuttle job schedule identified by its ID. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + * @param headers Headers of getShuttleJobScheduleByIdV2026R0 method + */ + public ShuttleJobScheduleV2026R0 getShuttleJobScheduleByIdV2026R0( + String shuttleJobScheduleId, GetShuttleJobScheduleByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_job_schedules/", + convertToString(shuttleJobScheduleId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobScheduleV2026R0.class); + } + + /** + * Updates the mutable properties of an existing shuttle job schedule identified by its ID. Only + * the fields supplied in the request body are changed. The owning job cannot be changed. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + * @param requestBody Request body of updateShuttleJobScheduleByIdV2026R0 method + */ + public ShuttleJobScheduleV2026R0 updateShuttleJobScheduleByIdV2026R0( + String shuttleJobScheduleId, ShuttleJobScheduleUpdateRequestV2026R0 requestBody) { + return updateShuttleJobScheduleByIdV2026R0( + shuttleJobScheduleId, requestBody, new UpdateShuttleJobScheduleByIdV2026R0Headers()); + } + + /** + * Updates the mutable properties of an existing shuttle job schedule identified by its ID. Only + * the fields supplied in the request body are changed. The owning job cannot be changed. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + * @param requestBody Request body of updateShuttleJobScheduleByIdV2026R0 method + * @param headers Headers of updateShuttleJobScheduleByIdV2026R0 method + */ + public ShuttleJobScheduleV2026R0 updateShuttleJobScheduleByIdV2026R0( + String shuttleJobScheduleId, + ShuttleJobScheduleUpdateRequestV2026R0 requestBody, + UpdateShuttleJobScheduleByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_job_schedules/", + convertToString(shuttleJobScheduleId)), + "PUT") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleJobScheduleV2026R0.class); + } + + /** + * Permanently deletes the shuttle job schedule identified by its ID. This does not affect runs + * that have already started. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + */ + public void deleteShuttleJobScheduleByIdV2026R0(String shuttleJobScheduleId) { + deleteShuttleJobScheduleByIdV2026R0( + shuttleJobScheduleId, new DeleteShuttleJobScheduleByIdV2026R0Headers()); + } + + /** + * Permanently deletes the shuttle job schedule identified by its ID. This does not affect runs + * that have already started. + * + * @param shuttleJobScheduleId The unique identifier for the shuttle job schedule. Example: + * "7c1ba68e810d9156194530b2" + * @param headers Headers of deleteShuttleJobScheduleByIdV2026R0 method + */ + public void deleteShuttleJobScheduleByIdV2026R0( + String shuttleJobScheduleId, DeleteShuttleJobScheduleByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_job_schedules/", + convertToString(shuttleJobScheduleId)), + "DELETE") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Returns a paginated list of path mappings for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttlePathMappingsV2026R0 method + */ + public ShuttlePathMappingsV2026R0 getShuttlePathMappingsV2026R0( + GetShuttlePathMappingsV2026R0QueryParams queryParams) { + return getShuttlePathMappingsV2026R0(queryParams, new GetShuttlePathMappingsV2026R0Headers()); + } + + /** + * Returns a paginated list of path mappings for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttlePathMappingsV2026R0 method + * @param headers Headers of getShuttlePathMappingsV2026R0 method + */ + public ShuttlePathMappingsV2026R0 getShuttlePathMappingsV2026R0( + GetShuttlePathMappingsV2026R0QueryParams queryParams, + GetShuttlePathMappingsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mappings"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttlePathMappingsV2026R0.class); + } + + /** + * Creates a path mapping that connects a source location on the migrated system to a destination + * in Box for the given shuttle job. + * + * @param requestBody Request body of createShuttlePathMappingV2026R0 method + */ + public ShuttlePathMappingV2026R0 createShuttlePathMappingV2026R0( + ShuttlePathMappingCreateRequestV2026R0 requestBody) { + return createShuttlePathMappingV2026R0( + requestBody, new CreateShuttlePathMappingV2026R0Headers()); + } + + /** + * Creates a path mapping that connects a source location on the migrated system to a destination + * in Box for the given shuttle job. + * + * @param requestBody Request body of createShuttlePathMappingV2026R0 method + * @param headers Headers of createShuttlePathMappingV2026R0 method + */ + public ShuttlePathMappingV2026R0 createShuttlePathMappingV2026R0( + ShuttlePathMappingCreateRequestV2026R0 requestBody, + CreateShuttlePathMappingV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mappings"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttlePathMappingV2026R0.class); + } + + /** + * Returns details for a single shuttle path mapping identified by its ID, including the source + * location and destination, if any. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + */ + public ShuttlePathMappingV2026R0 getShuttlePathMappingByIdV2026R0(String shuttlePathMappingId) { + return getShuttlePathMappingByIdV2026R0( + shuttlePathMappingId, new GetShuttlePathMappingByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle path mapping identified by its ID, including the source + * location and destination, if any. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + * @param headers Headers of getShuttlePathMappingByIdV2026R0 method + */ + public ShuttlePathMappingV2026R0 getShuttlePathMappingByIdV2026R0( + String shuttlePathMappingId, GetShuttlePathMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mappings/", + convertToString(shuttlePathMappingId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttlePathMappingV2026R0.class); + } + + /** + * Updates the mutable properties of an existing shuttle path mapping identified by its ID. Only + * the fields supplied in the request body are changed. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + * @param requestBody Request body of updateShuttlePathMappingByIdV2026R0 method + */ + public ShuttlePathMappingV2026R0 updateShuttlePathMappingByIdV2026R0( + String shuttlePathMappingId, ShuttlePathMappingUpdateRequestV2026R0 requestBody) { + return updateShuttlePathMappingByIdV2026R0( + shuttlePathMappingId, requestBody, new UpdateShuttlePathMappingByIdV2026R0Headers()); + } + + /** + * Updates the mutable properties of an existing shuttle path mapping identified by its ID. Only + * the fields supplied in the request body are changed. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + * @param requestBody Request body of updateShuttlePathMappingByIdV2026R0 method + * @param headers Headers of updateShuttlePathMappingByIdV2026R0 method + */ + public ShuttlePathMappingV2026R0 updateShuttlePathMappingByIdV2026R0( + String shuttlePathMappingId, + ShuttlePathMappingUpdateRequestV2026R0 requestBody, + UpdateShuttlePathMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mappings/", + convertToString(shuttlePathMappingId)), + "PUT") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttlePathMappingV2026R0.class); + } + + /** + * Permanently deletes the shuttle path mapping identified by its ID. This does not affect content + * that has already been migrated. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + */ + public void deleteShuttlePathMappingByIdV2026R0(String shuttlePathMappingId) { + deleteShuttlePathMappingByIdV2026R0( + shuttlePathMappingId, new DeleteShuttlePathMappingByIdV2026R0Headers()); + } + + /** + * Permanently deletes the shuttle path mapping identified by its ID. This does not affect content + * that has already been migrated. + * + * @param shuttlePathMappingId The unique identifier for the shuttle path mapping. Example: + * "6a3ba7a24ea17bc9461eeacd" + * @param headers Headers of deleteShuttlePathMappingByIdV2026R0 method + */ + public void deleteShuttlePathMappingByIdV2026R0( + String shuttlePathMappingId, DeleteShuttlePathMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mappings/", + convertToString(shuttlePathMappingId)), + "DELETE") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Accepts a spreadsheet of path mappings, already stored in Box, and replaces the job's path + * mappings. A file that is not a mapping workbook, or that exceeds the size or row limits (10 MiB + * Box download limit; 100,000 mapping rows), returns `400` synchronously and leaves the job + * unchanged. An accepted import always replaces every path mapping on the job. When all rows are + * valid the workbook is deployed in full. When any row is invalid the job ends with no path + * mappings and `mapping_state` becomes `paths_import_rejected` until the next import or the next + * manual path-mapping change. Row problems are listed by `GET /shuttle_mapping_errors?job_id=…` + * with category `path_import`, messages of the form `Row N: …`, at most 500 entries plus one + * overflow entry. Validation and deployment are asynchronous after acceptance. Poll `GET + * /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is `importing_paths`. Only one import may + * be in flight per job. + * + * @param requestBody Request body of createShuttlePathMappingImportV2026R0 method + */ + public void createShuttlePathMappingImportV2026R0( + ShuttlePathMappingImportCreateRequestV2026R0 requestBody) { + createShuttlePathMappingImportV2026R0( + requestBody, new CreateShuttlePathMappingImportV2026R0Headers()); + } + + /** + * Accepts a spreadsheet of path mappings, already stored in Box, and replaces the job's path + * mappings. A file that is not a mapping workbook, or that exceeds the size or row limits (10 MiB + * Box download limit; 100,000 mapping rows), returns `400` synchronously and leaves the job + * unchanged. An accepted import always replaces every path mapping on the job. When all rows are + * valid the workbook is deployed in full. When any row is invalid the job ends with no path + * mappings and `mapping_state` becomes `paths_import_rejected` until the next import or the next + * manual path-mapping change. Row problems are listed by `GET /shuttle_mapping_errors?job_id=…` + * with category `path_import`, messages of the form `Row N: …`, at most 500 entries plus one + * overflow entry. Validation and deployment are asynchronous after acceptance. Poll `GET + * /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is `importing_paths`. Only one import may + * be in flight per job. + * + * @param requestBody Request body of createShuttlePathMappingImportV2026R0 method + * @param headers Headers of createShuttlePathMappingImportV2026R0 method + */ + public void createShuttlePathMappingImportV2026R0( + ShuttlePathMappingImportCreateRequestV2026R0 requestBody, + CreateShuttlePathMappingImportV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_mapping_imports"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Accepts a spreadsheet of subject (user and group) mappings, already stored in Box, and replaces + * the job's subject mappings. A file that is not a subject-mapping workbook, or that exceeds the + * size or row limits (10 MiB Box download limit; 50,000 mapping rows), returns `400` + * synchronously and leaves the job unchanged. An accepted import always replaces every subject + * mapping on the job. When all rows are valid the workbook is deployed in full. When any row is + * invalid the job ends with no subject mappings and `mapping_state` becomes + * `subjects_import_rejected` until the next import or the next manual subject-mapping change. Row + * problems are listed by `GET /shuttle_mapping_errors?job_id=…` with category `subject_import`, + * messages of the form `Row N: …`, at most 500 entries plus one overflow entry. Validation and + * deployment are asynchronous after acceptance. Poll `GET /shuttle_jobs/{shuttle_job_id}` while + * `mapping_state` is `importing_subjects`. Only one import may be in flight per job. The job must + * map subjects (`account_mapping` enabled) and its source scan must be finished; otherwise the + * request returns `409`. + * + *

Expected workbook format (API clients cannot download the UI template): sheets `Users` + * and/or `Groups` (a sheet named `Subjects` is also accepted). Columns are `Source User + * <Key>`, `Target User <Key>`, `Skip` on `Users`, and `Source Group <Key>`, + * `Target Group <Key>`, `Skip` on `Groups`, where `<Key>` is the primary identifier + * for that role and system: - Users: `Email` for most systems; `ID` for `SharePoint` + * (2007/2010/2013); `Name` for Windows (`windows_union`, stored as the user id). - Groups: `Name` + * for most systems; `Email` for Google Drive admin groups. Source rows for a template can be + * taken from `GET /shuttle_discovered_subjects`. + * + * @param requestBody Request body of createShuttleSubjectMappingImportV2026R0 method + */ + public void createShuttleSubjectMappingImportV2026R0( + ShuttleSubjectMappingImportCreateRequestV2026R0 requestBody) { + createShuttleSubjectMappingImportV2026R0( + requestBody, new CreateShuttleSubjectMappingImportV2026R0Headers()); + } + + /** + * Accepts a spreadsheet of subject (user and group) mappings, already stored in Box, and replaces + * the job's subject mappings. A file that is not a subject-mapping workbook, or that exceeds the + * size or row limits (10 MiB Box download limit; 50,000 mapping rows), returns `400` + * synchronously and leaves the job unchanged. An accepted import always replaces every subject + * mapping on the job. When all rows are valid the workbook is deployed in full. When any row is + * invalid the job ends with no subject mappings and `mapping_state` becomes + * `subjects_import_rejected` until the next import or the next manual subject-mapping change. Row + * problems are listed by `GET /shuttle_mapping_errors?job_id=…` with category `subject_import`, + * messages of the form `Row N: …`, at most 500 entries plus one overflow entry. Validation and + * deployment are asynchronous after acceptance. Poll `GET /shuttle_jobs/{shuttle_job_id}` while + * `mapping_state` is `importing_subjects`. Only one import may be in flight per job. The job must + * map subjects (`account_mapping` enabled) and its source scan must be finished; otherwise the + * request returns `409`. + * + *

Expected workbook format (API clients cannot download the UI template): sheets `Users` + * and/or `Groups` (a sheet named `Subjects` is also accepted). Columns are `Source User + * <Key>`, `Target User <Key>`, `Skip` on `Users`, and `Source Group <Key>`, + * `Target Group <Key>`, `Skip` on `Groups`, where `<Key>` is the primary identifier + * for that role and system: - Users: `Email` for most systems; `ID` for `SharePoint` + * (2007/2010/2013); `Name` for Windows (`windows_union`, stored as the user id). - Groups: `Name` + * for most systems; `Email` for Google Drive admin groups. Source rows for a template can be + * taken from `GET /shuttle_discovered_subjects`. + * + * @param requestBody Request body of createShuttleSubjectMappingImportV2026R0 method + * @param headers Headers of createShuttleSubjectMappingImportV2026R0 method + */ + public void createShuttleSubjectMappingImportV2026R0( + ShuttleSubjectMappingImportCreateRequestV2026R0 requestBody, + CreateShuttleSubjectMappingImportV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mapping_imports"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Returns a paginated list of subject mappings for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleSubjectMappingsV2026R0 method + */ + public ShuttleSubjectMappingsV2026R0 getShuttleSubjectMappingsV2026R0( + GetShuttleSubjectMappingsV2026R0QueryParams queryParams) { + return getShuttleSubjectMappingsV2026R0( + queryParams, new GetShuttleSubjectMappingsV2026R0Headers()); + } + + /** + * Returns a paginated list of subject mappings for the shuttle job identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleSubjectMappingsV2026R0 method + * @param headers Headers of getShuttleSubjectMappingsV2026R0 method + */ + public ShuttleSubjectMappingsV2026R0 getShuttleSubjectMappingsV2026R0( + GetShuttleSubjectMappingsV2026R0QueryParams queryParams, + GetShuttleSubjectMappingsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mappings"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSubjectMappingsV2026R0.class); + } + + /** + * Creates a subject mapping that connects a discovered source subject to a Box user or group for + * the given shuttle job. + * + * @param requestBody Request body of createShuttleSubjectMappingV2026R0 method + */ + public ShuttleSubjectMappingV2026R0 createShuttleSubjectMappingV2026R0( + ShuttleSubjectMappingCreateRequestV2026R0 requestBody) { + return createShuttleSubjectMappingV2026R0( + requestBody, new CreateShuttleSubjectMappingV2026R0Headers()); + } + + /** + * Creates a subject mapping that connects a discovered source subject to a Box user or group for + * the given shuttle job. + * + * @param requestBody Request body of createShuttleSubjectMappingV2026R0 method + * @param headers Headers of createShuttleSubjectMappingV2026R0 method + */ + public ShuttleSubjectMappingV2026R0 createShuttleSubjectMappingV2026R0( + ShuttleSubjectMappingCreateRequestV2026R0 requestBody, + CreateShuttleSubjectMappingV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mappings"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSubjectMappingV2026R0.class); + } + + /** + * Returns details for a single shuttle subject mapping identified by its ID, including the source + * subject and Box target, if any. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + */ + public ShuttleSubjectMappingV2026R0 getShuttleSubjectMappingByIdV2026R0( + String shuttleSubjectMappingId) { + return getShuttleSubjectMappingByIdV2026R0( + shuttleSubjectMappingId, new GetShuttleSubjectMappingByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle subject mapping identified by its ID, including the source + * subject and Box target, if any. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + * @param headers Headers of getShuttleSubjectMappingByIdV2026R0 method + */ + public ShuttleSubjectMappingV2026R0 getShuttleSubjectMappingByIdV2026R0( + String shuttleSubjectMappingId, GetShuttleSubjectMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mappings/", + convertToString(shuttleSubjectMappingId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSubjectMappingV2026R0.class); + } + + /** + * Updates the mutable properties of an existing shuttle subject mapping identified by its ID. + * Only the fields supplied in the request body are changed. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + * @param requestBody Request body of updateShuttleSubjectMappingByIdV2026R0 method + */ + public ShuttleSubjectMappingV2026R0 updateShuttleSubjectMappingByIdV2026R0( + String shuttleSubjectMappingId, ShuttleSubjectMappingUpdateRequestV2026R0 requestBody) { + return updateShuttleSubjectMappingByIdV2026R0( + shuttleSubjectMappingId, requestBody, new UpdateShuttleSubjectMappingByIdV2026R0Headers()); + } + + /** + * Updates the mutable properties of an existing shuttle subject mapping identified by its ID. + * Only the fields supplied in the request body are changed. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + * @param requestBody Request body of updateShuttleSubjectMappingByIdV2026R0 method + * @param headers Headers of updateShuttleSubjectMappingByIdV2026R0 method + */ + public ShuttleSubjectMappingV2026R0 updateShuttleSubjectMappingByIdV2026R0( + String shuttleSubjectMappingId, + ShuttleSubjectMappingUpdateRequestV2026R0 requestBody, + UpdateShuttleSubjectMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mappings/", + convertToString(shuttleSubjectMappingId)), + "PUT") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleSubjectMappingV2026R0.class); + } + + /** + * Permanently deletes the shuttle subject mapping identified by its ID. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + */ + public void deleteShuttleSubjectMappingByIdV2026R0(String shuttleSubjectMappingId) { + deleteShuttleSubjectMappingByIdV2026R0( + shuttleSubjectMappingId, new DeleteShuttleSubjectMappingByIdV2026R0Headers()); + } + + /** + * Permanently deletes the shuttle subject mapping identified by its ID. + * + * @param shuttleSubjectMappingId The unique identifier for the shuttle subject mapping. Example: + * "6a3ba7b12ea17bc9461eeace" + * @param headers Headers of deleteShuttleSubjectMappingByIdV2026R0 method + */ + public void deleteShuttleSubjectMappingByIdV2026R0( + String shuttleSubjectMappingId, DeleteShuttleSubjectMappingByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_subject_mappings/", + convertToString(shuttleSubjectMappingId)), + "DELETE") + .headers(headersMap) + .responseFormat(ResponseFormat.NO_CONTENT) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + } + + /** + * Returns a paginated list of subjects discovered on the source system for the shuttle job + * identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleDiscoveredSubjectsV2026R0 method + */ + public ShuttleDiscoveredSubjectsV2026R0 getShuttleDiscoveredSubjectsV2026R0( + GetShuttleDiscoveredSubjectsV2026R0QueryParams queryParams) { + return getShuttleDiscoveredSubjectsV2026R0( + queryParams, new GetShuttleDiscoveredSubjectsV2026R0Headers()); + } + + /** + * Returns a paginated list of subjects discovered on the source system for the shuttle job + * identified by `job_id`. + * + * @param queryParams Query parameters of getShuttleDiscoveredSubjectsV2026R0 method + * @param headers Headers of getShuttleDiscoveredSubjectsV2026R0 method + */ + public ShuttleDiscoveredSubjectsV2026R0 getShuttleDiscoveredSubjectsV2026R0( + GetShuttleDiscoveredSubjectsV2026R0QueryParams queryParams, + GetShuttleDiscoveredSubjectsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_discovered_subjects"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleDiscoveredSubjectsV2026R0.class); + } + + /** + * Returns a paginated list of source or target path entries for a shuttle job. Call with only + * `job_id` and `side` to list the roots, then browse one level at a time using `path`, `path_id`, + * or both. Each entry includes `path`, `path_id`, `is_directory`, and a `scope` object (`account` + * or `shared_space`) so a mapping can be created from that row without extra browse state. Valid + * values depend on the selected system. + * + * @param queryParams Query parameters of getShuttlePathEntriesV2026R0 method + */ + public ShuttlePathEntriesV2026R0 getShuttlePathEntriesV2026R0( + GetShuttlePathEntriesV2026R0QueryParams queryParams) { + return getShuttlePathEntriesV2026R0(queryParams, new GetShuttlePathEntriesV2026R0Headers()); + } + + /** + * Returns a paginated list of source or target path entries for a shuttle job. Call with only + * `job_id` and `side` to list the roots, then browse one level at a time using `path`, `path_id`, + * or both. Each entry includes `path`, `path_id`, `is_directory`, and a `scope` object (`account` + * or `shared_space`) so a mapping can be created from that row without extra browse state. Valid + * values depend on the selected system. + * + * @param queryParams Query parameters of getShuttlePathEntriesV2026R0 method + * @param headers Headers of getShuttlePathEntriesV2026R0 method + */ + public ShuttlePathEntriesV2026R0 getShuttlePathEntriesV2026R0( + GetShuttlePathEntriesV2026R0QueryParams queryParams, + GetShuttlePathEntriesV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("side", convertToString(queryParams.getSide())), + entryOf("path", convertToString(queryParams.getPath())), + entryOf("path_id", convertToString(queryParams.getPathId())), + entryOf("account_email", convertToString(queryParams.getAccountEmail())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_path_entries"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttlePathEntriesV2026R0.class); + } + + /** + * Returns a paginated list of mapping errors for a shuttle job. Only the latest record for each + * error is returned. The revision field identifies the mapping revision in which that error was + * generated. + * + * @param queryParams Query parameters of getShuttleMappingErrorsV2026R0 method + */ + public ShuttleMappingErrorsV2026R0 getShuttleMappingErrorsV2026R0( + GetShuttleMappingErrorsV2026R0QueryParams queryParams) { + return getShuttleMappingErrorsV2026R0(queryParams, new GetShuttleMappingErrorsV2026R0Headers()); + } + + /** + * Returns a paginated list of mapping errors for a shuttle job. Only the latest record for each + * error is returned. The revision field identifies the mapping revision in which that error was + * generated. + * + * @param queryParams Query parameters of getShuttleMappingErrorsV2026R0 method + * @param headers Headers of getShuttleMappingErrorsV2026R0 method + */ + public ShuttleMappingErrorsV2026R0 getShuttleMappingErrorsV2026R0( + GetShuttleMappingErrorsV2026R0QueryParams queryParams, + GetShuttleMappingErrorsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("job_id", convertToString(queryParams.getJobId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_mapping_errors"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleMappingErrorsV2026R0.class); + } + + /** + * Returns a paginated list of reports generated for the shuttle run identified by `run_id`. + * + * @param queryParams Query parameters of getShuttleReportsV2026R0 method + */ + public ShuttleReportsV2026R0 getShuttleReportsV2026R0( + GetShuttleReportsV2026R0QueryParams queryParams) { + return getShuttleReportsV2026R0(queryParams, new GetShuttleReportsV2026R0Headers()); + } + + /** + * Returns a paginated list of reports generated for the shuttle run identified by `run_id`. + * + * @param queryParams Query parameters of getShuttleReportsV2026R0 method + * @param headers Headers of getShuttleReportsV2026R0 method + */ + public ShuttleReportsV2026R0 getShuttleReportsV2026R0( + GetShuttleReportsV2026R0QueryParams queryParams, GetShuttleReportsV2026R0Headers headers) { + Map queryParamsMap = + prepareParams( + mapOf( + entryOf("run_id", convertToString(queryParams.getRunId())), + entryOf("marker", convertToString(queryParams.getMarker())), + entryOf("limit", convertToString(queryParams.getLimit())))); + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_reports"), + "GET") + .params(queryParamsMap) + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleReportsV2026R0.class); + } + + /** + * Requests asynchronous generation of a report for a shuttle run. The report is returned + * immediately in `pending` or `processing` status. Poll `GET + * /shuttle_reports/{shuttle_report_id}` while `status` is `pending` or `processing`. Stop when + * `status` is `complete`, `failed`, `canceled`, or `unknown`. Repeating this request with the + * same parameters reuses the existing report instead of creating a duplicate. + * + * @param requestBody Request body of createShuttleReportV2026R0 method + */ + public ShuttleReportV2026R0 createShuttleReportV2026R0( + ShuttleReportCreateRequestV2026R0 requestBody) { + return createShuttleReportV2026R0(requestBody, new CreateShuttleReportV2026R0Headers()); + } + + /** + * Requests asynchronous generation of a report for a shuttle run. The report is returned + * immediately in `pending` or `processing` status. Poll `GET + * /shuttle_reports/{shuttle_report_id}` while `status` is `pending` or `processing`. Stop when + * `status` is `complete`, `failed`, `canceled`, or `unknown`. Repeating this request with the + * same parameters reuses the existing report instead of creating a duplicate. + * + * @param requestBody Request body of createShuttleReportV2026R0 method + * @param headers Headers of createShuttleReportV2026R0 method + */ + public ShuttleReportV2026R0 createShuttleReportV2026R0( + ShuttleReportCreateRequestV2026R0 requestBody, CreateShuttleReportV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_reports"), + "POST") + .headers(headersMap) + .data(JsonManager.serialize(requestBody)) + .contentType("application/json") + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleReportV2026R0.class); + } + + /** + * Returns details for a single shuttle report identified by its ID, including generation status + * and, once generation finishes, the Box output reference. + * + * @param shuttleReportId The unique identifier for the shuttle report. Example: + * "6a3ba8d14f2c91e8370b4d12" + */ + public ShuttleReportV2026R0 getShuttleReportByIdV2026R0(String shuttleReportId) { + return getShuttleReportByIdV2026R0(shuttleReportId, new GetShuttleReportByIdV2026R0Headers()); + } + + /** + * Returns details for a single shuttle report identified by its ID, including generation status + * and, once generation finishes, the Box output reference. + * + * @param shuttleReportId The unique identifier for the shuttle report. Example: + * "6a3ba8d14f2c91e8370b4d12" + * @param headers Headers of getShuttleReportByIdV2026R0 method + */ + public ShuttleReportV2026R0 getShuttleReportByIdV2026R0( + String shuttleReportId, GetShuttleReportByIdV2026R0Headers headers) { + Map headersMap = + prepareParams( + mergeMaps( + mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))), + headers.getExtraHeaders())); + FetchResponse response = + this.networkSession + .getNetworkClient() + .fetch( + new FetchOptions.Builder( + String.join( + "", + this.networkSession.getBaseUrls().getBaseUrl(), + "/2.0/shuttle_reports/", + convertToString(shuttleReportId)), + "GET") + .headers(headersMap) + .responseFormat(ResponseFormat.JSON) + .auth(this.auth) + .networkSession(this.networkSession) + .build()); + return JsonManager.deserialize(response.getData(), ShuttleReportV2026R0.class); + } + + public Authentication getAuth() { + return auth; + } + + public NetworkSession getNetworkSession() { + return networkSession; + } + + public static class Builder { + + protected Authentication auth; + + protected NetworkSession networkSession; + + public Builder() {} + + public Builder auth(Authentication auth) { + this.auth = auth; + return this; + } + + public Builder networkSession(NetworkSession networkSession) { + this.networkSession = networkSession; + return this; + } + + public ShuttleManager build() { + if (this.networkSession == null) { + this.networkSession = new NetworkSession(); + } + return new ShuttleManager(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobByIdV2026R0Headers.java new file mode 100644 index 000000000..9836aceab --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class UpdateShuttleJobByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public UpdateShuttleJobByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected UpdateShuttleJobByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public UpdateShuttleJobByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new UpdateShuttleJobByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobScheduleByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobScheduleByIdV2026R0Headers.java new file mode 100644 index 000000000..47f7ea84d --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleJobScheduleByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class UpdateShuttleJobScheduleByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public UpdateShuttleJobScheduleByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected UpdateShuttleJobScheduleByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public UpdateShuttleJobScheduleByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new UpdateShuttleJobScheduleByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttlePathMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttlePathMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..679cffe2a --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttlePathMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class UpdateShuttlePathMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public UpdateShuttlePathMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected UpdateShuttlePathMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public UpdateShuttlePathMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new UpdateShuttlePathMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSubjectMappingByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSubjectMappingByIdV2026R0Headers.java new file mode 100644 index 000000000..218d0bcc2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSubjectMappingByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class UpdateShuttleSubjectMappingByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public UpdateShuttleSubjectMappingByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected UpdateShuttleSubjectMappingByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public UpdateShuttleSubjectMappingByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new UpdateShuttleSubjectMappingByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSystemByIdV2026R0Headers.java b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSystemByIdV2026R0Headers.java new file mode 100644 index 000000000..3862057d2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/managers/shuttle/UpdateShuttleSystemByIdV2026R0Headers.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.managers.shuttle; + +import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; + +import com.box.sdkgen.parameters.v2026r0.boxversionheaderv2026r0.BoxVersionHeaderV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import java.util.Map; + +public class UpdateShuttleSystemByIdV2026R0Headers { + + /** Version header. */ + public EnumWrapper boxVersion; + + /** Extra headers that will be included in the HTTP request. */ + public Map extraHeaders; + + public UpdateShuttleSystemByIdV2026R0Headers() { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + this.extraHeaders = mapOf(); + } + + protected UpdateShuttleSystemByIdV2026R0Headers(Builder builder) { + this.boxVersion = builder.boxVersion; + this.extraHeaders = builder.extraHeaders; + } + + public EnumWrapper getBoxVersion() { + return boxVersion; + } + + public Map getExtraHeaders() { + return extraHeaders; + } + + public static class Builder { + + protected EnumWrapper boxVersion; + + protected Map extraHeaders; + + public Builder() {} + + public Builder boxVersion(BoxVersionHeaderV2026R0 boxVersion) { + this.boxVersion = new EnumWrapper(boxVersion); + return this; + } + + public Builder boxVersion(EnumWrapper boxVersion) { + this.boxVersion = boxVersion; + return this; + } + + public Builder extraHeaders(Map extraHeaders) { + this.extraHeaders = extraHeaders; + return this; + } + + public UpdateShuttleSystemByIdV2026R0Headers build() { + if (this.boxVersion == null) { + this.boxVersion = new EnumWrapper(BoxVersionHeaderV2026R0._2026_0); + } + if (this.extraHeaders == null) { + this.extraHeaders = mapOf(); + } + return new UpdateShuttleSystemByIdV2026R0Headers(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/managers/users/DeleteUserByIdQueryParams.java b/src/main/java/com/box/sdkgen/managers/users/DeleteUserByIdQueryParams.java index 28d250932..60c37c088 100644 --- a/src/main/java/com/box/sdkgen/managers/users/DeleteUserByIdQueryParams.java +++ b/src/main/java/com/box/sdkgen/managers/users/DeleteUserByIdQueryParams.java @@ -5,7 +5,14 @@ public class DeleteUserByIdQueryParams { /** Whether the user will receive email notification of the deletion. */ public Boolean notify; - /** Specifies whether to delete the user even if they still own files. */ + /** + * Specifies whether to delete the user even if they still own files. + * + *

If the user owns content and the enterprise has a retention policy, including a retired one, + * or a legal hold that is not fully released, setting `force` to `true` doesn't delete the user. + * The request returns a `403` error, and you must transfer the user's content before deleting the + * user. + */ public Boolean force; public DeleteUserByIdQueryParams() {} diff --git a/src/main/java/com/box/sdkgen/managers/users/UsersManager.java b/src/main/java/com/box/sdkgen/managers/users/UsersManager.java index 92cc5f078..66e0cea16 100644 --- a/src/main/java/com/box/sdkgen/managers/users/UsersManager.java +++ b/src/main/java/com/box/sdkgen/managers/users/UsersManager.java @@ -481,6 +481,11 @@ public UserFull updateUserById( * proceed, move their owned content first, or use the `force` parameter to delete the user and * their files. * + *

If the enterprise has a retention policy, including a retired one, or a legal hold that is + * not fully released, you can't delete a user who owns content, even with `force`. Transfer the + * user's content first by using the [Transfer owned + * folders](https://developer.box.com/reference/put-users-id-folders-0) endpoint. + * * @param userId The ID of the user. Example: "12345" */ public void deleteUserById(String userId) { @@ -492,6 +497,11 @@ public void deleteUserById(String userId) { * proceed, move their owned content first, or use the `force` parameter to delete the user and * their files. * + *

If the enterprise has a retention policy, including a retired one, or a legal hold that is + * not fully released, you can't delete a user who owns content, even with `force`. Transfer the + * user's content first by using the [Transfer owned + * folders](https://developer.box.com/reference/put-users-id-folders-0) endpoint. + * * @param userId The ID of the user. Example: "12345" * @param queryParams Query parameters of deleteUserById method */ @@ -504,6 +514,11 @@ public void deleteUserById(String userId, DeleteUserByIdQueryParams queryParams) * proceed, move their owned content first, or use the `force` parameter to delete the user and * their files. * + *

If the enterprise has a retention policy, including a retired one, or a legal hold that is + * not fully released, you can't delete a user who owns content, even with `force`. Transfer the + * user's content first by using the [Transfer owned + * folders](https://developer.box.com/reference/put-users-id-folders-0) endpoint. + * * @param userId The ID of the user. Example: "12345" * @param headers Headers of deleteUserById method */ @@ -516,6 +531,11 @@ public void deleteUserById(String userId, DeleteUserByIdHeaders headers) { * proceed, move their owned content first, or use the `force` parameter to delete the user and * their files. * + *

If the enterprise has a retention policy, including a retired one, or a legal hold that is + * not fully released, you can't delete a user who owns content, even with `force`. Transfer the + * user's content first by using the [Transfer owned + * folders](https://developer.box.com/reference/put-users-id-folders-0) endpoint. + * * @param userId The ID of the user. Example: "12345" * @param queryParams Query parameters of deleteUserById method * @param headers Headers of deleteUserById method diff --git a/src/main/java/com/box/sdkgen/managers/weblinks/UpdateWebLinkByIdRequestBodySharedLinkField.java b/src/main/java/com/box/sdkgen/managers/weblinks/UpdateWebLinkByIdRequestBodySharedLinkField.java index 0dabfd364..be39cca8c 100644 --- a/src/main/java/com/box/sdkgen/managers/weblinks/UpdateWebLinkByIdRequestBodySharedLinkField.java +++ b/src/main/java/com/box/sdkgen/managers/weblinks/UpdateWebLinkByIdRequestBodySharedLinkField.java @@ -4,6 +4,10 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.sharedlinkotpwritable.SharedLinkOtpWritable; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -63,6 +67,9 @@ public class UpdateWebLinkByIdRequestBodySharedLinkField extends SerializableObj @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) protected OffsetDateTime unsharedAt; + @JsonProperty("one_time_passcode") + protected SharedLinkOtpWritable oneTimePasscode; + public UpdateWebLinkByIdRequestBodySharedLinkField() { super(); } @@ -73,6 +80,7 @@ protected UpdateWebLinkByIdRequestBodySharedLinkField(Builder builder) { this.password = builder.password; this.vanityName = builder.vanityName; this.unsharedAt = builder.unsharedAt; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -92,6 +100,10 @@ public OffsetDateTime getUnsharedAt() { return unsharedAt; } + public SharedLinkOtpWritable getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -105,12 +117,13 @@ public boolean equals(Object o) { return Objects.equals(access, casted.access) && Objects.equals(password, casted.password) && Objects.equals(vanityName, casted.vanityName) - && Objects.equals(unsharedAt, casted.unsharedAt); + && Objects.equals(unsharedAt, casted.unsharedAt) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override public int hashCode() { - return Objects.hash(access, password, vanityName, unsharedAt); + return Objects.hash(access, password, vanityName, unsharedAt, oneTimePasscode); } @Override @@ -131,6 +144,10 @@ public String toString() { + "unsharedAt='" + unsharedAt + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -144,6 +161,8 @@ public static class Builder extends NullableFieldTracker { protected OffsetDateTime unsharedAt; + protected SharedLinkOtpWritable oneTimePasscode; + public Builder access(UpdateWebLinkByIdRequestBodySharedLinkAccessField access) { this.access = new EnumWrapper(access); return this; @@ -170,6 +189,26 @@ public Builder unsharedAt(OffsetDateTime unsharedAt) { return this; } + public Builder oneTimePasscode(SharedLinkOtpWritableNone oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableOpen oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritableAllowlist oneTimePasscode) { + this.oneTimePasscode = new SharedLinkOtpWritable(oneTimePasscode); + return this; + } + + public Builder oneTimePasscode(SharedLinkOtpWritable oneTimePasscode) { + this.oneTimePasscode = oneTimePasscode; + return this; + } + public UpdateWebLinkByIdRequestBodySharedLinkField build() { return new UpdateWebLinkByIdRequestBodySharedLinkField(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/event/EventEventTypeField.java b/src/main/java/com/box/sdkgen/schemas/event/EventEventTypeField.java index 757be6b56..d59ed9376 100644 --- a/src/main/java/com/box/sdkgen/schemas/event/EventEventTypeField.java +++ b/src/main/java/com/box/sdkgen/schemas/event/EventEventTypeField.java @@ -155,6 +155,8 @@ public enum EventEventTypeField implements Valuable { RENAME("RENAME"), RETENTION_POLICY_ASSIGNMENT_ADD("RETENTION_POLICY_ASSIGNMENT_ADD"), SHARE("SHARE"), + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS("SHARED_LINK_ONE_TIME_PASSCODE_ACCESS"), + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE("SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE"), SHARED_LINK_REDIRECT_OUT_OF_SHARED_CONTEXT("SHARED_LINK_REDIRECT_OUT_OF_SHARED_CONTEXT"), SHARED_LINK_SEND("SHARED_LINK_SEND"), SHARE_EXPIRATION("SHARE_EXPIRATION"), @@ -166,6 +168,7 @@ public enum EventEventTypeField implements Valuable { SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED"), SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION"), + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED("SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED"), SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION( "SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION"), diff --git a/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkField.java b/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkField.java index 2ec833a4a..fa6a25781 100644 --- a/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkField.java +++ b/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkField.java @@ -121,13 +121,17 @@ public class FileSharedLinkField extends SerializableObject { @JsonProperty("preview_count") protected final long previewCount; + @JsonProperty("one_time_passcode") + protected final FileSharedLinkOneTimePasscodeField oneTimePasscode; + public FileSharedLinkField( String url, FileSharedLinkEffectiveAccessField effectiveAccess, FileSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -136,6 +140,7 @@ public FileSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FileSharedLinkField( @@ -144,7 +149,8 @@ public FileSharedLinkField( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -152,6 +158,7 @@ public FileSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FileSharedLinkField( @@ -160,7 +167,8 @@ public FileSharedLinkField( FileSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -169,6 +177,7 @@ public FileSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FileSharedLinkField( @@ -179,7 +188,8 @@ public FileSharedLinkField( EnumWrapper effectivePermission, @JsonProperty("is_password_enabled") boolean isPasswordEnabled, @JsonProperty("download_count") long downloadCount, - @JsonProperty("preview_count") long previewCount) { + @JsonProperty("preview_count") long previewCount, + @JsonProperty("one_time_passcode") FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -187,6 +197,7 @@ public FileSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } protected FileSharedLinkField(Builder builder) { @@ -203,6 +214,7 @@ protected FileSharedLinkField(Builder builder) { this.permissions = builder.permissions; this.downloadCount = builder.downloadCount; this.previewCount = builder.previewCount; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -254,6 +266,10 @@ public long getPreviewCount() { return previewCount; } + public FileSharedLinkOneTimePasscodeField getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -274,7 +290,8 @@ public boolean equals(Object o) { && Objects.equals(isPasswordEnabled, casted.isPasswordEnabled) && Objects.equals(permissions, casted.permissions) && Objects.equals(downloadCount, casted.downloadCount) - && Objects.equals(previewCount, casted.previewCount); + && Objects.equals(previewCount, casted.previewCount) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override @@ -291,7 +308,8 @@ public int hashCode() { isPasswordEnabled, permissions, downloadCount, - previewCount); + previewCount, + oneTimePasscode); } @Override @@ -344,6 +362,10 @@ public String toString() { + "previewCount='" + previewCount + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -373,13 +395,16 @@ public static class Builder extends NullableFieldTracker { protected final long previewCount; + protected final FileSharedLinkOneTimePasscodeField oneTimePasscode; + public Builder( String url, FileSharedLinkEffectiveAccessField effectiveAccess, FileSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -388,6 +413,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -396,7 +422,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -404,6 +431,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -412,7 +440,8 @@ public Builder( FileSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -421,6 +450,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -429,7 +459,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FileSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -437,6 +468,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder downloadUrl(String downloadUrl) { diff --git a/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkOneTimePasscodeField.java b/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkOneTimePasscodeField.java new file mode 100644 index 000000000..fc2a28b29 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/file/FileSharedLinkOneTimePasscodeField.java @@ -0,0 +1,110 @@ +package com.box.sdkgen.schemas.file; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.sharedlinkotpallowlistentry.SharedLinkOtpAllowlistEntry; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class FileSharedLinkOneTimePasscodeField extends SerializableObject { + + /** + * The current OTP enforcement mode for the shared link. + * + *

* `none` - OTP enforcement is turned off. The shared link is accessible without any + * one-time-passcode verification. * `open` - Any anonymous recipient can request a + * one-time-passcode to any email address and access the shared link after verifying it. + * Collaborators and registered Box users access the link without being prompted. * `allowlist` - + * Anonymous recipients can request a one-time-passcode only when they enter an email that matches + * an entry on the `allowlist`. + */ + protected final String mode; + + /** + * The list of email and domain entries that are permitted to access the shared link when `mode` + * is `allowlist`. Anonymous users whose email matches an entry can request and verify a + * one-time-passcode. + * + *

Because the entries carry recipient email addresses and the identity of the user who added + * them, this field is only returned to users with owner, co-owner, or editor access on the item. + * For viewer collaborators and below the field is omitted. + * + *

An allowlist contains at most 1000 entries, matching the limit enforced when setting the + * allowlist on a shared link. + */ + protected List allowlist; + + public FileSharedLinkOneTimePasscodeField(@JsonProperty("mode") String mode) { + super(); + this.mode = mode; + } + + protected FileSharedLinkOneTimePasscodeField(Builder builder) { + super(); + this.mode = builder.mode; + this.allowlist = builder.allowlist; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getMode() { + return mode; + } + + public List getAllowlist() { + return allowlist; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSharedLinkOneTimePasscodeField casted = (FileSharedLinkOneTimePasscodeField) o; + return Objects.equals(mode, casted.mode) && Objects.equals(allowlist, casted.allowlist); + } + + @Override + public int hashCode() { + return Objects.hash(mode, allowlist); + } + + @Override + public String toString() { + return "FileSharedLinkOneTimePasscodeField{" + + "mode='" + + mode + + '\'' + + ", " + + "allowlist='" + + allowlist + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String mode; + + protected List allowlist; + + public Builder(String mode) { + super(); + this.mode = mode; + } + + public Builder allowlist(List allowlist) { + this.allowlist = allowlist; + return this; + } + + public FileSharedLinkOneTimePasscodeField build() { + return new FileSharedLinkOneTimePasscodeField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkField.java b/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkField.java index a75c27421..4557eb90e 100644 --- a/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkField.java +++ b/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkField.java @@ -124,13 +124,17 @@ public class FolderSharedLinkField extends SerializableObject { @JsonProperty("preview_count") protected final long previewCount; + @JsonProperty("one_time_passcode") + protected final FolderSharedLinkOneTimePasscodeField oneTimePasscode; + public FolderSharedLinkField( String url, FolderSharedLinkEffectiveAccessField effectiveAccess, FolderSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -139,6 +143,7 @@ public FolderSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FolderSharedLinkField( @@ -147,7 +152,8 @@ public FolderSharedLinkField( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -155,6 +161,7 @@ public FolderSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FolderSharedLinkField( @@ -163,7 +170,8 @@ public FolderSharedLinkField( FolderSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -172,6 +180,7 @@ public FolderSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public FolderSharedLinkField( @@ -182,7 +191,8 @@ public FolderSharedLinkField( EnumWrapper effectivePermission, @JsonProperty("is_password_enabled") boolean isPasswordEnabled, @JsonProperty("download_count") long downloadCount, - @JsonProperty("preview_count") long previewCount) { + @JsonProperty("preview_count") long previewCount, + @JsonProperty("one_time_passcode") FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -190,6 +200,7 @@ public FolderSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } protected FolderSharedLinkField(Builder builder) { @@ -206,6 +217,7 @@ protected FolderSharedLinkField(Builder builder) { this.permissions = builder.permissions; this.downloadCount = builder.downloadCount; this.previewCount = builder.previewCount; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -257,6 +269,10 @@ public long getPreviewCount() { return previewCount; } + public FolderSharedLinkOneTimePasscodeField getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -277,7 +293,8 @@ public boolean equals(Object o) { && Objects.equals(isPasswordEnabled, casted.isPasswordEnabled) && Objects.equals(permissions, casted.permissions) && Objects.equals(downloadCount, casted.downloadCount) - && Objects.equals(previewCount, casted.previewCount); + && Objects.equals(previewCount, casted.previewCount) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override @@ -294,7 +311,8 @@ public int hashCode() { isPasswordEnabled, permissions, downloadCount, - previewCount); + previewCount, + oneTimePasscode); } @Override @@ -347,6 +365,10 @@ public String toString() { + "previewCount='" + previewCount + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -376,13 +398,16 @@ public static class Builder extends NullableFieldTracker { protected final long previewCount; + protected final FolderSharedLinkOneTimePasscodeField oneTimePasscode; + public Builder( String url, FolderSharedLinkEffectiveAccessField effectiveAccess, FolderSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -391,6 +416,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -399,7 +425,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -407,6 +434,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -415,7 +443,8 @@ public Builder( FolderSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -424,6 +453,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -432,7 +462,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + FolderSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -440,6 +471,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder downloadUrl(String downloadUrl) { diff --git a/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkOneTimePasscodeField.java b/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkOneTimePasscodeField.java new file mode 100644 index 000000000..5dc063fd6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkOneTimePasscodeField.java @@ -0,0 +1,110 @@ +package com.box.sdkgen.schemas.folder; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.sharedlinkotpallowlistentry.SharedLinkOtpAllowlistEntry; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class FolderSharedLinkOneTimePasscodeField extends SerializableObject { + + /** + * The current OTP enforcement mode for the shared link. + * + *

* `none` - OTP enforcement is turned off. The shared link is accessible without any + * one-time-passcode verification. * `open` - Any anonymous recipient can request a + * one-time-passcode to any email address and access the shared link after verifying it. + * Collaborators and registered Box users access the link without being prompted. * `allowlist` - + * Anonymous recipients can request a one-time-passcode only when they enter an email that matches + * an entry on the `allowlist`. + */ + protected final String mode; + + /** + * The list of email and domain entries that are permitted to access the shared link when `mode` + * is `allowlist`. Anonymous users whose email matches an entry can request and verify a + * one-time-passcode. + * + *

Because the entries carry recipient email addresses and the identity of the user who added + * them, this field is only returned to users with owner, co-owner, or editor access on the item. + * For viewer collaborators and below the field is omitted. + * + *

An allowlist contains at most 1000 entries, matching the limit enforced when setting the + * allowlist on a shared link. + */ + protected List allowlist; + + public FolderSharedLinkOneTimePasscodeField(@JsonProperty("mode") String mode) { + super(); + this.mode = mode; + } + + protected FolderSharedLinkOneTimePasscodeField(Builder builder) { + super(); + this.mode = builder.mode; + this.allowlist = builder.allowlist; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getMode() { + return mode; + } + + public List getAllowlist() { + return allowlist; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FolderSharedLinkOneTimePasscodeField casted = (FolderSharedLinkOneTimePasscodeField) o; + return Objects.equals(mode, casted.mode) && Objects.equals(allowlist, casted.allowlist); + } + + @Override + public int hashCode() { + return Objects.hash(mode, allowlist); + } + + @Override + public String toString() { + return "FolderSharedLinkOneTimePasscodeField{" + + "mode='" + + mode + + '\'' + + ", " + + "allowlist='" + + allowlist + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String mode; + + protected List allowlist; + + public Builder(String mode) { + super(); + this.mode = mode; + } + + public Builder allowlist(List allowlist) { + this.allowlist = allowlist; + return this; + } + + public FolderSharedLinkOneTimePasscodeField build() { + return new FolderSharedLinkOneTimePasscodeField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/keywordskillcard/KeywordSkillCard.java b/src/main/java/com/box/sdkgen/schemas/keywordskillcard/KeywordSkillCard.java index 42236acb4..d743a6fa2 100644 --- a/src/main/java/com/box/sdkgen/schemas/keywordskillcard/KeywordSkillCard.java +++ b/src/main/java/com/box/sdkgen/schemas/keywordskillcard/KeywordSkillCard.java @@ -48,7 +48,7 @@ public class KeywordSkillCard extends SerializableObject { */ protected final KeywordSkillCardInvocationField invocation; - /** An list of entries in the metadata card. */ + /** A list of entries in the metadata card. */ protected final List entries; public KeywordSkillCard( diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntry.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntry.java new file mode 100644 index 000000000..61b49fcdc --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntry.java @@ -0,0 +1,133 @@ +package com.box.sdkgen.schemas.sharedlinkotpallowlistentry; + +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.userbase.UserBase; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * An entry on the OTP allowlist for a shared link. The entry can match either a specific email + * address or every email address that belongs to a domain. + */ +@JsonFilter("nullablePropertyFilter") +public class SharedLinkOtpAllowlistEntry extends SerializableObject { + + /** + * The kind of allowlist entry. + * + *

* `email` - The entry matches a single email address. * `domain` - The entry matches every + * email address under the given domain. + */ + @JsonDeserialize( + using = + SharedLinkOtpAllowlistEntryTypeField.SharedLinkOtpAllowlistEntryTypeFieldDeserializer + .class) + @JsonSerialize( + using = + SharedLinkOtpAllowlistEntryTypeField.SharedLinkOtpAllowlistEntryTypeFieldSerializer.class) + protected final EnumWrapper type; + + /** + * The value of the allowlist entry. + * + *

* For `email` entries, the full email address (must contain `@`). * For `domain` + * entries, the bare domain (e.g. `example.com`). + */ + protected final String value; + + /** The date and time when the allowlist entry was added. */ + @JsonProperty("created_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + protected final OffsetDateTime createdAt; + + @JsonProperty("created_by") + protected final UserBase createdBy; + + public SharedLinkOtpAllowlistEntry( + SharedLinkOtpAllowlistEntryTypeField type, + String value, + OffsetDateTime createdAt, + UserBase createdBy) { + super(); + this.type = new EnumWrapper(type); + this.value = value; + this.createdAt = createdAt; + this.createdBy = createdBy; + } + + public SharedLinkOtpAllowlistEntry( + @JsonProperty("type") EnumWrapper type, + @JsonProperty("value") String value, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("created_by") UserBase createdBy) { + super(); + this.type = type; + this.value = value; + this.createdAt = createdAt; + this.createdBy = createdBy; + } + + public EnumWrapper getType() { + return type; + } + + public String getValue() { + return value; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public UserBase getCreatedBy() { + return createdBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedLinkOtpAllowlistEntry casted = (SharedLinkOtpAllowlistEntry) o; + return Objects.equals(type, casted.type) + && Objects.equals(value, casted.value) + && Objects.equals(createdAt, casted.createdAt) + && Objects.equals(createdBy, casted.createdBy); + } + + @Override + public int hashCode() { + return Objects.hash(type, value, createdAt, createdBy); + } + + @Override + public String toString() { + return "SharedLinkOtpAllowlistEntry{" + + "type='" + + type + + '\'' + + ", " + + "value='" + + value + + '\'' + + ", " + + "createdAt='" + + createdAt + + '\'' + + ", " + + "createdBy='" + + createdBy + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntryTypeField.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntryTypeField.java new file mode 100644 index 000000000..6dafe9e47 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentry/SharedLinkOtpAllowlistEntryTypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.sharedlinkotpallowlistentry; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum SharedLinkOtpAllowlistEntryTypeField implements Valuable { + EMAIL("email"), + DOMAIN("domain"); + + private final String value; + + SharedLinkOtpAllowlistEntryTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class SharedLinkOtpAllowlistEntryTypeFieldDeserializer + extends JsonDeserializer> { + + public SharedLinkOtpAllowlistEntryTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(SharedLinkOtpAllowlistEntryTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class SharedLinkOtpAllowlistEntryTypeFieldSerializer + extends JsonSerializer> { + + public SharedLinkOtpAllowlistEntryTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritable.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritable.java new file mode 100644 index 000000000..3897ba1d8 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritable.java @@ -0,0 +1,94 @@ +package com.box.sdkgen.schemas.sharedlinkotpallowlistentrywritable; + +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * An entry used to write the OTP allowlist for a shared link. The entry can match either a specific + * email address or every email address that belongs to a domain. + */ +@JsonFilter("nullablePropertyFilter") +public class SharedLinkOtpAllowlistEntryWritable extends SerializableObject { + + /** + * The kind of allowlist entry. + * + *

* `email` - The entry matches a single email address. * `domain` - The entry matches every + * email address under the given domain. + */ + @JsonDeserialize( + using = + SharedLinkOtpAllowlistEntryWritableTypeField + .SharedLinkOtpAllowlistEntryWritableTypeFieldDeserializer.class) + @JsonSerialize( + using = + SharedLinkOtpAllowlistEntryWritableTypeField + .SharedLinkOtpAllowlistEntryWritableTypeFieldSerializer.class) + protected final EnumWrapper type; + + /** + * The value of the allowlist entry. + * + *

* For `email` entries, the full email address (must contain `@`). * For `domain` + * entries, the bare domain (e.g. `example.com`). + */ + protected final String value; + + public SharedLinkOtpAllowlistEntryWritable( + SharedLinkOtpAllowlistEntryWritableTypeField type, String value) { + super(); + this.type = new EnumWrapper(type); + this.value = value; + } + + public SharedLinkOtpAllowlistEntryWritable( + @JsonProperty("type") EnumWrapper type, + @JsonProperty("value") String value) { + super(); + this.type = type; + this.value = value; + } + + public EnumWrapper getType() { + return type; + } + + public String getValue() { + return value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedLinkOtpAllowlistEntryWritable casted = (SharedLinkOtpAllowlistEntryWritable) o; + return Objects.equals(type, casted.type) && Objects.equals(value, casted.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, value); + } + + @Override + public String toString() { + return "SharedLinkOtpAllowlistEntryWritable{" + + "type='" + + type + + '\'' + + ", " + + "value='" + + value + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritableTypeField.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritableTypeField.java new file mode 100644 index 000000000..b32749d8a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpallowlistentrywritable/SharedLinkOtpAllowlistEntryWritableTypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.sharedlinkotpallowlistentrywritable; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum SharedLinkOtpAllowlistEntryWritableTypeField implements Valuable { + EMAIL("email"), + DOMAIN("domain"); + + private final String value; + + SharedLinkOtpAllowlistEntryWritableTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class SharedLinkOtpAllowlistEntryWritableTypeFieldDeserializer + extends JsonDeserializer> { + + public SharedLinkOtpAllowlistEntryWritableTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(SharedLinkOtpAllowlistEntryWritableTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class SharedLinkOtpAllowlistEntryWritableTypeFieldSerializer + extends JsonSerializer> { + + public SharedLinkOtpAllowlistEntryWritableTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritable/SharedLinkOtpWritable.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritable/SharedLinkOtpWritable.java new file mode 100644 index 000000000..0b8045e03 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritable/SharedLinkOtpWritable.java @@ -0,0 +1,97 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritable; + +import com.box.sdkgen.internal.OneOfThree; +import com.box.sdkgen.schemas.sharedlinkotpwritableallowlist.SharedLinkOtpWritableAllowlist; +import com.box.sdkgen.schemas.sharedlinkotpwritablenone.SharedLinkOtpWritableNone; +import com.box.sdkgen.schemas.sharedlinkotpwritableopen.SharedLinkOtpWritableOpen; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize(using = SharedLinkOtpWritable.SharedLinkOtpWritableDeserializer.class) +@JsonSerialize(using = OneOfThree.OneOfThreeSerializer.class) +public class SharedLinkOtpWritable + extends OneOfThree< + SharedLinkOtpWritableNone, SharedLinkOtpWritableOpen, SharedLinkOtpWritableAllowlist> { + + protected final String mode; + + public SharedLinkOtpWritable(SharedLinkOtpWritableNone sharedLinkOtpWritableNone) { + super(sharedLinkOtpWritableNone, null, null); + this.mode = EnumWrapper.convertToString(sharedLinkOtpWritableNone.getMode()); + } + + public SharedLinkOtpWritable(SharedLinkOtpWritableOpen sharedLinkOtpWritableOpen) { + super(null, sharedLinkOtpWritableOpen, null); + this.mode = EnumWrapper.convertToString(sharedLinkOtpWritableOpen.getMode()); + } + + public SharedLinkOtpWritable(SharedLinkOtpWritableAllowlist sharedLinkOtpWritableAllowlist) { + super(null, null, sharedLinkOtpWritableAllowlist); + this.mode = EnumWrapper.convertToString(sharedLinkOtpWritableAllowlist.getMode()); + } + + public boolean isSharedLinkOtpWritableNone() { + return value0 != null; + } + + public SharedLinkOtpWritableNone getSharedLinkOtpWritableNone() { + return value0; + } + + public boolean isSharedLinkOtpWritableOpen() { + return value1 != null; + } + + public SharedLinkOtpWritableOpen getSharedLinkOtpWritableOpen() { + return value1; + } + + public boolean isSharedLinkOtpWritableAllowlist() { + return value2 != null; + } + + public SharedLinkOtpWritableAllowlist getSharedLinkOtpWritableAllowlist() { + return value2; + } + + public String getMode() { + return mode; + } + + static class SharedLinkOtpWritableDeserializer extends JsonDeserializer { + + public SharedLinkOtpWritableDeserializer() { + super(); + } + + @Override + public SharedLinkOtpWritable deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + try { + return new SharedLinkOtpWritable( + OneOfThree.OBJECT_MAPPER.convertValue(node, SharedLinkOtpWritableNone.class)); + } catch (Exception ignored) { + } + try { + return new SharedLinkOtpWritable( + OneOfThree.OBJECT_MAPPER.convertValue(node, SharedLinkOtpWritableOpen.class)); + } catch (Exception ignored) { + } + try { + return new SharedLinkOtpWritable( + OneOfThree.OBJECT_MAPPER.convertValue(node, SharedLinkOtpWritableAllowlist.class)); + } catch (Exception ignored) { + } + throw new JsonMappingException(jp, "Unable to deserialize SharedLinkOtpWritable"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlist.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlist.java new file mode 100644 index 000000000..47a071396 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlist.java @@ -0,0 +1,126 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritableallowlist; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.sharedlinkotpallowlistentrywritable.SharedLinkOtpAllowlistEntryWritable; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** + * Anonymous recipients can request a one-time-passcode only when they enter an email that matches + * an entry on the `allowlist`. + */ +@JsonFilter("nullablePropertyFilter") +public class SharedLinkOtpWritableAllowlist extends SerializableObject { + + /** Set to `allowlist` to restrict OTP requests to emails matching an entry on the `allowlist`. */ + @JsonDeserialize( + using = + SharedLinkOtpWritableAllowlistModeField + .SharedLinkOtpWritableAllowlistModeFieldDeserializer.class) + @JsonSerialize( + using = + SharedLinkOtpWritableAllowlistModeField.SharedLinkOtpWritableAllowlistModeFieldSerializer + .class) + protected EnumWrapper mode; + + /** + * The list of email and domain entries that are permitted to access the shared link when `mode` + * is `allowlist`. Anonymous users whose email matches an entry can request and verify a + * one-time-passcode. + * + *

Providing this field replaces the entire existing allowlist; passing an empty array clears + * all entries. Required when `mode` is `allowlist`. + */ + protected final List allowlist; + + public SharedLinkOtpWritableAllowlist( + @JsonProperty("allowlist") List allowlist) { + super(); + this.allowlist = allowlist; + this.mode = + new EnumWrapper( + SharedLinkOtpWritableAllowlistModeField.ALLOWLIST); + } + + protected SharedLinkOtpWritableAllowlist(Builder builder) { + super(); + this.mode = builder.mode; + this.allowlist = builder.allowlist; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getMode() { + return mode; + } + + public List getAllowlist() { + return allowlist; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedLinkOtpWritableAllowlist casted = (SharedLinkOtpWritableAllowlist) o; + return Objects.equals(mode, casted.mode) && Objects.equals(allowlist, casted.allowlist); + } + + @Override + public int hashCode() { + return Objects.hash(mode, allowlist); + } + + @Override + public String toString() { + return "SharedLinkOtpWritableAllowlist{" + + "mode='" + + mode + + '\'' + + ", " + + "allowlist='" + + allowlist + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper mode; + + protected final List allowlist; + + public Builder(List allowlist) { + super(); + this.allowlist = allowlist; + } + + public Builder mode(SharedLinkOtpWritableAllowlistModeField mode) { + this.mode = new EnumWrapper(mode); + return this; + } + + public Builder mode(EnumWrapper mode) { + this.mode = mode; + return this; + } + + public SharedLinkOtpWritableAllowlist build() { + if (this.mode == null) { + this.mode = + new EnumWrapper( + SharedLinkOtpWritableAllowlistModeField.ALLOWLIST); + } + return new SharedLinkOtpWritableAllowlist(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlistModeField.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlistModeField.java new file mode 100644 index 000000000..c6ab7fd46 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableallowlist/SharedLinkOtpWritableAllowlistModeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritableallowlist; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum SharedLinkOtpWritableAllowlistModeField implements Valuable { + ALLOWLIST("allowlist"); + + private final String value; + + SharedLinkOtpWritableAllowlistModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class SharedLinkOtpWritableAllowlistModeFieldDeserializer + extends JsonDeserializer> { + + public SharedLinkOtpWritableAllowlistModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(SharedLinkOtpWritableAllowlistModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class SharedLinkOtpWritableAllowlistModeFieldSerializer + extends JsonSerializer> { + + public SharedLinkOtpWritableAllowlistModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNone.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNone.java new file mode 100644 index 000000000..116aedc01 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNone.java @@ -0,0 +1,92 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritablenone; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * One-time-passcode (OTP) enforcement is turned off. The shared link is accessible without any + * one-time-passcode verification. + */ +@JsonFilter("nullablePropertyFilter") +public class SharedLinkOtpWritableNone extends SerializableObject { + + /** Set to `none` to disable OTP enforcement for the shared link. */ + @JsonDeserialize( + using = + SharedLinkOtpWritableNoneModeField.SharedLinkOtpWritableNoneModeFieldDeserializer.class) + @JsonSerialize( + using = SharedLinkOtpWritableNoneModeField.SharedLinkOtpWritableNoneModeFieldSerializer.class) + protected EnumWrapper mode; + + public SharedLinkOtpWritableNone() { + super(); + this.mode = + new EnumWrapper( + SharedLinkOtpWritableNoneModeField.NONE); + } + + protected SharedLinkOtpWritableNone(Builder builder) { + super(); + this.mode = builder.mode; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getMode() { + return mode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedLinkOtpWritableNone casted = (SharedLinkOtpWritableNone) o; + return Objects.equals(mode, casted.mode); + } + + @Override + public int hashCode() { + return Objects.hash(mode); + } + + @Override + public String toString() { + return "SharedLinkOtpWritableNone{" + "mode='" + mode + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper mode; + + public Builder() { + super(); + } + + public Builder mode(SharedLinkOtpWritableNoneModeField mode) { + this.mode = new EnumWrapper(mode); + return this; + } + + public Builder mode(EnumWrapper mode) { + this.mode = mode; + return this; + } + + public SharedLinkOtpWritableNone build() { + if (this.mode == null) { + this.mode = + new EnumWrapper( + SharedLinkOtpWritableNoneModeField.NONE); + } + return new SharedLinkOtpWritableNone(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNoneModeField.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNoneModeField.java new file mode 100644 index 000000000..fd7a1bb79 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritablenone/SharedLinkOtpWritableNoneModeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritablenone; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum SharedLinkOtpWritableNoneModeField implements Valuable { + NONE("none"); + + private final String value; + + SharedLinkOtpWritableNoneModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class SharedLinkOtpWritableNoneModeFieldDeserializer + extends JsonDeserializer> { + + public SharedLinkOtpWritableNoneModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(SharedLinkOtpWritableNoneModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class SharedLinkOtpWritableNoneModeFieldSerializer + extends JsonSerializer> { + + public SharedLinkOtpWritableNoneModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpen.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpen.java new file mode 100644 index 000000000..b44909883 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpen.java @@ -0,0 +1,96 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritableopen; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * Any anonymous recipient can request a one-time-passcode to any email address and access the + * shared link after verifying it. Collaborators and registered Box users access the link without + * being prompted. + */ +@JsonFilter("nullablePropertyFilter") +public class SharedLinkOtpWritableOpen extends SerializableObject { + + /** + * Set to `open` to allow any anonymous recipient to request a one-time-passcode to any email + * address. + */ + @JsonDeserialize( + using = + SharedLinkOtpWritableOpenModeField.SharedLinkOtpWritableOpenModeFieldDeserializer.class) + @JsonSerialize( + using = SharedLinkOtpWritableOpenModeField.SharedLinkOtpWritableOpenModeFieldSerializer.class) + protected EnumWrapper mode; + + public SharedLinkOtpWritableOpen() { + super(); + this.mode = + new EnumWrapper( + SharedLinkOtpWritableOpenModeField.OPEN); + } + + protected SharedLinkOtpWritableOpen(Builder builder) { + super(); + this.mode = builder.mode; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getMode() { + return mode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedLinkOtpWritableOpen casted = (SharedLinkOtpWritableOpen) o; + return Objects.equals(mode, casted.mode); + } + + @Override + public int hashCode() { + return Objects.hash(mode); + } + + @Override + public String toString() { + return "SharedLinkOtpWritableOpen{" + "mode='" + mode + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper mode; + + public Builder() { + super(); + } + + public Builder mode(SharedLinkOtpWritableOpenModeField mode) { + this.mode = new EnumWrapper(mode); + return this; + } + + public Builder mode(EnumWrapper mode) { + this.mode = mode; + return this; + } + + public SharedLinkOtpWritableOpen build() { + if (this.mode == null) { + this.mode = + new EnumWrapper( + SharedLinkOtpWritableOpenModeField.OPEN); + } + return new SharedLinkOtpWritableOpen(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpenModeField.java b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpenModeField.java new file mode 100644 index 000000000..99b6414ba --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/sharedlinkotpwritableopen/SharedLinkOtpWritableOpenModeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.sharedlinkotpwritableopen; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum SharedLinkOtpWritableOpenModeField implements Valuable { + OPEN("open"); + + private final String value; + + SharedLinkOtpWritableOpenModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class SharedLinkOtpWritableOpenModeFieldDeserializer + extends JsonDeserializer> { + + public SharedLinkOtpWritableOpenModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(SharedLinkOtpWritableOpenModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class SharedLinkOtpWritableOpenModeFieldSerializer + extends JsonSerializer> { + + public SharedLinkOtpWritableOpenModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/signrequestcreatesigner/SignRequestCreateSigner.java b/src/main/java/com/box/sdkgen/schemas/signrequestcreatesigner/SignRequestCreateSigner.java index 521cfcea3..382576808 100644 --- a/src/main/java/com/box/sdkgen/schemas/signrequestcreatesigner/SignRequestCreateSigner.java +++ b/src/main/java/com/box/sdkgen/schemas/signrequestcreatesigner/SignRequestCreateSigner.java @@ -103,7 +103,10 @@ public class SignRequestCreateSigner extends SerializableObject { @Nullable protected String signerGroupId; - /** If true, no emails about the sign request will be sent. */ + /** + * If true, no emails about the sign request are sent. The `embed_url_external_user_id` parameter + * is required when using `suppress_notifications` for a signer. + */ @JsonProperty("suppress_notifications") @Nullable protected Boolean suppressNotifications; diff --git a/src/main/java/com/box/sdkgen/schemas/transcriptskillcard/TranscriptSkillCard.java b/src/main/java/com/box/sdkgen/schemas/transcriptskillcard/TranscriptSkillCard.java index e248ab8af..e6dd4748c 100644 --- a/src/main/java/com/box/sdkgen/schemas/transcriptskillcard/TranscriptSkillCard.java +++ b/src/main/java/com/box/sdkgen/schemas/transcriptskillcard/TranscriptSkillCard.java @@ -60,7 +60,7 @@ public class TranscriptSkillCard extends SerializableObject { protected Long duration; /** - * An list of entries for the card. This represents the individual entries of the transcription. + * A list of entries for the card. This represents the individual entries of the transcription. */ protected final List entries; diff --git a/src/main/java/com/box/sdkgen/schemas/uploadsession/UploadSession.java b/src/main/java/com/box/sdkgen/schemas/uploadsession/UploadSession.java index 9276f593f..3849139d1 100644 --- a/src/main/java/com/box/sdkgen/schemas/uploadsession/UploadSession.java +++ b/src/main/java/com/box/sdkgen/schemas/uploadsession/UploadSession.java @@ -30,7 +30,7 @@ public class UploadSession extends SerializableObject { protected OffsetDateTime sessionExpiresAt; /** - * The size in bytes that must be used for all parts of of the upload. + * The size in bytes that must be used for all parts of the upload. * *

Only the last part is allowed to be of a smaller size. */ @@ -47,8 +47,8 @@ public class UploadSession extends SerializableObject { /** * The number of parts that have been uploaded and processed by the server. This starts at `0`. * - *

When committing a file files, inspecting this property can provide insight if all parts have - * been uploaded correctly. + *

When committing a file, inspecting this property can provide insight if all parts have been + * uploaded correctly. */ @JsonProperty("num_parts_processed") protected Integer numPartsProcessed; diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/archivev2025r0/ArchiveV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/archivev2025r0/ArchiveV2025R0.java index 605c383b9..c20486d40 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/archivev2025r0/ArchiveV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/archivev2025r0/ArchiveV2025R0.java @@ -43,16 +43,18 @@ public class ArchiveV2025R0 extends SerializableObject { /** The part of an archive API response that describes the user who owns the archive. */ @JsonProperty("owned_by") - protected ArchiveV2025R0OwnedByField ownedBy; + protected final ArchiveV2025R0OwnedByField ownedBy; public ArchiveV2025R0( @JsonProperty("id") String id, @JsonProperty("name") String name, - @JsonProperty("size") long size) { + @JsonProperty("size") long size, + @JsonProperty("owned_by") ArchiveV2025R0OwnedByField ownedBy) { super(); this.id = id; this.name = name; this.size = size; + this.ownedBy = ownedBy; this.type = new EnumWrapper(ArchiveV2025R0TypeField.ARCHIVE); } @@ -154,13 +156,14 @@ public static class Builder extends NullableFieldTracker { protected String description; - protected ArchiveV2025R0OwnedByField ownedBy; + protected final ArchiveV2025R0OwnedByField ownedBy; - public Builder(String id, String name, long size) { + public Builder(String id, String name, long size, ArchiveV2025R0OwnedByField ownedBy) { super(); this.id = id; this.name = name; this.size = size; + this.ownedBy = ownedBy; } public Builder type(ArchiveV2025R0TypeField type) { @@ -179,11 +182,6 @@ public Builder description(String description) { return this; } - public Builder ownedBy(ArchiveV2025R0OwnedByField ownedBy) { - this.ownedBy = ownedBy; - return this; - } - public ArchiveV2025R0 build() { if (this.type == null) { this.type = new EnumWrapper(ArchiveV2025R0TypeField.ARCHIVE); diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentfailuresv2026r0/DocumentFailuresV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentfailuresv2026r0/DocumentFailuresV2026R0.java new file mode 100644 index 000000000..b5ea21640 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentfailuresv2026r0/DocumentFailuresV2026R0.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentfailuresv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** Errors and warnings that occurred during a document job. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentFailuresV2026R0 extends SerializableObject { + + /** A list of errors that occurred during the document job. */ + protected final List errors; + + /** A list of warnings that occurred during the document job. */ + protected final List warnings; + + public DocumentFailuresV2026R0( + @JsonProperty("errors") List errors, + @JsonProperty("warnings") List warnings) { + super(); + this.errors = errors; + this.warnings = warnings; + } + + public List getErrors() { + return errors; + } + + public List getWarnings() { + return warnings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentFailuresV2026R0 casted = (DocumentFailuresV2026R0) o; + return Objects.equals(errors, casted.errors) && Objects.equals(warnings, casted.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(errors, warnings); + } + + @Override + public String toString() { + return "DocumentFailuresV2026R0{" + + "errors='" + + errors + + '\'' + + ", " + + "warnings='" + + warnings + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0.java new file mode 100644 index 000000000..b2f0e7467 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0.java @@ -0,0 +1,161 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.documentsplitpagerangev2026r0.DocumentSplitPageRangeV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** Validation rules for creating a Document Split job using caller-supplied page ranges. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitCreateRequestManualV2026R0 extends SerializableObject { + + /** Discriminator. Must be `manual` for this variant. */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestManualV2026R0SplitTypeField + .DocumentSplitCreateRequestManualV2026R0SplitTypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestManualV2026R0SplitTypeField + .DocumentSplitCreateRequestManualV2026R0SplitTypeFieldSerializer.class) + @JsonProperty("split_type") + protected EnumWrapper splitType; + + /** + * The version of the manual split input format. Omitted or `v_1` is the legacy `split_definition` + * format. Existing clients may omit this field. + */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestManualV2026R0VersionField + .DocumentSplitCreateRequestManualV2026R0VersionFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestManualV2026R0VersionField + .DocumentSplitCreateRequestManualV2026R0VersionFieldSerializer.class) + protected EnumWrapper version; + + /** + * Page ranges that define the split. Each entry produces one output file containing the inclusive + * page range `[start, end]`. + */ + @JsonProperty("split_definition") + protected final List splitDefinition; + + public DocumentSplitCreateRequestManualV2026R0( + @JsonProperty("split_definition") List splitDefinition) { + super(); + this.splitDefinition = splitDefinition; + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestManualV2026R0SplitTypeField.MANUAL); + } + + protected DocumentSplitCreateRequestManualV2026R0(Builder builder) { + super(); + this.splitType = builder.splitType; + this.version = builder.version; + this.splitDefinition = builder.splitDefinition; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getSplitType() { + return splitType; + } + + public EnumWrapper getVersion() { + return version; + } + + public List getSplitDefinition() { + return splitDefinition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitCreateRequestManualV2026R0 casted = (DocumentSplitCreateRequestManualV2026R0) o; + return Objects.equals(splitType, casted.splitType) + && Objects.equals(version, casted.version) + && Objects.equals(splitDefinition, casted.splitDefinition); + } + + @Override + public int hashCode() { + return Objects.hash(splitType, version, splitDefinition); + } + + @Override + public String toString() { + return "DocumentSplitCreateRequestManualV2026R0{" + + "splitType='" + + splitType + + '\'' + + ", " + + "version='" + + version + + '\'' + + ", " + + "splitDefinition='" + + splitDefinition + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper splitType; + + protected EnumWrapper version; + + protected final List splitDefinition; + + public Builder(List splitDefinition) { + super(); + this.splitDefinition = splitDefinition; + } + + public Builder splitType(DocumentSplitCreateRequestManualV2026R0SplitTypeField splitType) { + this.splitType = + new EnumWrapper(splitType); + return this; + } + + public Builder splitType( + EnumWrapper splitType) { + this.splitType = splitType; + return this; + } + + public Builder version(DocumentSplitCreateRequestManualV2026R0VersionField version) { + this.version = new EnumWrapper(version); + return this; + } + + public Builder version( + EnumWrapper version) { + this.version = version; + return this; + } + + public DocumentSplitCreateRequestManualV2026R0 build() { + if (this.splitType == null) { + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestManualV2026R0SplitTypeField.MANUAL); + } + return new DocumentSplitCreateRequestManualV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0SplitTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0SplitTypeField.java new file mode 100644 index 000000000..9e583b56a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0SplitTypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestManualV2026R0SplitTypeField implements Valuable { + MANUAL("manual"); + + private final String value; + + DocumentSplitCreateRequestManualV2026R0SplitTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestManualV2026R0SplitTypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitCreateRequestManualV2026R0SplitTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestManualV2026R0SplitTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestManualV2026R0SplitTypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitCreateRequestManualV2026R0SplitTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0VersionField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0VersionField.java new file mode 100644 index 000000000..d3bb125fb --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestmanualv2026r0/DocumentSplitCreateRequestManualV2026R0VersionField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestManualV2026R0VersionField implements Valuable { + V_1("v_1"); + + private final String value; + + DocumentSplitCreateRequestManualV2026R0VersionField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestManualV2026R0VersionFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitCreateRequestManualV2026R0VersionFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestManualV2026R0VersionField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestManualV2026R0VersionFieldSerializer + extends JsonSerializer> { + + public DocumentSplitCreateRequestManualV2026R0VersionFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0.java new file mode 100644 index 000000000..57a51b98b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0.java @@ -0,0 +1,159 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** + * Validation rules for creating a Document Split job using non-linear page selections. Each item + * produces one output file from the declared page segments. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitCreateRequestPageSelectionV2026R0 extends SerializableObject { + + /** Discriminator. Must be `page_selection` for this variant. */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField + .DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField + .DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldSerializer.class) + @JsonProperty("split_type") + protected EnumWrapper splitType; + + /** The version of the page selection input format. Optional. When provided must be `v_2`. */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestPageSelectionV2026R0VersionField + .DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestPageSelectionV2026R0VersionField + .DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldSerializer.class) + protected EnumWrapper version; + + @JsonProperty("page_selection") + protected final List pageSelection; + + public DocumentSplitCreateRequestPageSelectionV2026R0( + @JsonProperty("page_selection") List pageSelection) { + super(); + this.pageSelection = pageSelection; + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.PAGE_SELECTION); + } + + protected DocumentSplitCreateRequestPageSelectionV2026R0(Builder builder) { + super(); + this.splitType = builder.splitType; + this.version = builder.version; + this.pageSelection = builder.pageSelection; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getSplitType() { + return splitType; + } + + public EnumWrapper getVersion() { + return version; + } + + public List getPageSelection() { + return pageSelection; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitCreateRequestPageSelectionV2026R0 casted = + (DocumentSplitCreateRequestPageSelectionV2026R0) o; + return Objects.equals(splitType, casted.splitType) + && Objects.equals(version, casted.version) + && Objects.equals(pageSelection, casted.pageSelection); + } + + @Override + public int hashCode() { + return Objects.hash(splitType, version, pageSelection); + } + + @Override + public String toString() { + return "DocumentSplitCreateRequestPageSelectionV2026R0{" + + "splitType='" + + splitType + + '\'' + + ", " + + "version='" + + version + + '\'' + + ", " + + "pageSelection='" + + pageSelection + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper splitType; + + protected EnumWrapper version; + + protected final List pageSelection; + + public Builder(List pageSelection) { + super(); + this.pageSelection = pageSelection; + } + + public Builder splitType( + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField splitType) { + this.splitType = + new EnumWrapper(splitType); + return this; + } + + public Builder splitType( + EnumWrapper splitType) { + this.splitType = splitType; + return this; + } + + public Builder version(DocumentSplitCreateRequestPageSelectionV2026R0VersionField version) { + this.version = + new EnumWrapper(version); + return this; + } + + public Builder version( + EnumWrapper version) { + this.version = version; + return this; + } + + public DocumentSplitCreateRequestPageSelectionV2026R0 build() { + if (this.splitType == null) { + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.PAGE_SELECTION); + } + return new DocumentSplitCreateRequestPageSelectionV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.java new file mode 100644 index 000000000..526d597fe --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField implements Valuable { + PAGE_SELECTION("page_selection"); + + private final String value; + + DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0VersionField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0VersionField.java new file mode 100644 index 000000000..feef61129 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestpageselectionv2026r0/DocumentSplitCreateRequestPageSelectionV2026R0VersionField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestPageSelectionV2026R0VersionField implements Valuable { + V_2("v_2"); + + private final String value; + + DocumentSplitCreateRequestPageSelectionV2026R0VersionField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestPageSelectionV2026R0VersionField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public DocumentSplitCreateRequestPageSelectionV2026R0VersionFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0.java new file mode 100644 index 000000000..91e27e4fd --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0.java @@ -0,0 +1,119 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestsmartv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * Validation rules for creating a Document Split job using Box-generated page ranges guided by a + * caller-supplied prompt. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitCreateRequestSmartV2026R0 extends SerializableObject { + + /** Discriminator. Must be `smart` for this variant. */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestSmartV2026R0SplitTypeField + .DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestSmartV2026R0SplitTypeField + .DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldSerializer.class) + @JsonProperty("split_type") + protected EnumWrapper splitType; + + /** A natural language prompt that guides automatic page range detection. */ + protected final String prompt; + + public DocumentSplitCreateRequestSmartV2026R0(@JsonProperty("prompt") String prompt) { + super(); + this.prompt = prompt; + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestSmartV2026R0SplitTypeField.SMART); + } + + protected DocumentSplitCreateRequestSmartV2026R0(Builder builder) { + super(); + this.splitType = builder.splitType; + this.prompt = builder.prompt; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getSplitType() { + return splitType; + } + + public String getPrompt() { + return prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitCreateRequestSmartV2026R0 casted = (DocumentSplitCreateRequestSmartV2026R0) o; + return Objects.equals(splitType, casted.splitType) && Objects.equals(prompt, casted.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(splitType, prompt); + } + + @Override + public String toString() { + return "DocumentSplitCreateRequestSmartV2026R0{" + + "splitType='" + + splitType + + '\'' + + ", " + + "prompt='" + + prompt + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper splitType; + + protected final String prompt; + + public Builder(String prompt) { + super(); + this.prompt = prompt; + } + + public Builder splitType(DocumentSplitCreateRequestSmartV2026R0SplitTypeField splitType) { + this.splitType = + new EnumWrapper(splitType); + return this; + } + + public Builder splitType( + EnumWrapper splitType) { + this.splitType = splitType; + return this; + } + + public DocumentSplitCreateRequestSmartV2026R0 build() { + if (this.splitType == null) { + this.splitType = + new EnumWrapper( + DocumentSplitCreateRequestSmartV2026R0SplitTypeField.SMART); + } + return new DocumentSplitCreateRequestSmartV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0SplitTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0SplitTypeField.java new file mode 100644 index 000000000..d0f5c7016 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestsmartv2026r0/DocumentSplitCreateRequestSmartV2026R0SplitTypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestsmartv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestSmartV2026R0SplitTypeField implements Valuable { + SMART("smart"); + + private final String value; + + DocumentSplitCreateRequestSmartV2026R0SplitTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestSmartV2026R0SplitTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitCreateRequestSmartV2026R0SplitTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequesttypev2026r0/DocumentSplitCreateRequestTypeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequesttypev2026r0/DocumentSplitCreateRequestTypeV2026R0.java new file mode 100644 index 000000000..4fd6429e7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequesttypev2026r0/DocumentSplitCreateRequestTypeV2026R0.java @@ -0,0 +1,115 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequesttypev2026r0; + +import com.box.sdkgen.internal.OneOfThree; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0.DocumentSplitCreateRequestManualV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0.DocumentSplitCreateRequestPageSelectionV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestsmartv2026r0.DocumentSplitCreateRequestSmartV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = + DocumentSplitCreateRequestTypeV2026R0.DocumentSplitCreateRequestTypeV2026R0Deserializer + .class) +@JsonSerialize(using = OneOfThree.OneOfThreeSerializer.class) +public class DocumentSplitCreateRequestTypeV2026R0 + extends OneOfThree< + DocumentSplitCreateRequestManualV2026R0, + DocumentSplitCreateRequestPageSelectionV2026R0, + DocumentSplitCreateRequestSmartV2026R0> { + + protected final String splitType; + + public DocumentSplitCreateRequestTypeV2026R0( + DocumentSplitCreateRequestManualV2026R0 documentSplitCreateRequestManualV2026R0) { + super(documentSplitCreateRequestManualV2026R0, null, null); + this.splitType = + EnumWrapper.convertToString(documentSplitCreateRequestManualV2026R0.getSplitType()); + } + + public DocumentSplitCreateRequestTypeV2026R0( + DocumentSplitCreateRequestPageSelectionV2026R0 + documentSplitCreateRequestPageSelectionV2026R0) { + super(null, documentSplitCreateRequestPageSelectionV2026R0, null); + this.splitType = + EnumWrapper.convertToString(documentSplitCreateRequestPageSelectionV2026R0.getSplitType()); + } + + public DocumentSplitCreateRequestTypeV2026R0( + DocumentSplitCreateRequestSmartV2026R0 documentSplitCreateRequestSmartV2026R0) { + super(null, null, documentSplitCreateRequestSmartV2026R0); + this.splitType = + EnumWrapper.convertToString(documentSplitCreateRequestSmartV2026R0.getSplitType()); + } + + public boolean isDocumentSplitCreateRequestManualV2026R0() { + return value0 != null; + } + + public DocumentSplitCreateRequestManualV2026R0 getDocumentSplitCreateRequestManualV2026R0() { + return value0; + } + + public boolean isDocumentSplitCreateRequestPageSelectionV2026R0() { + return value1 != null; + } + + public DocumentSplitCreateRequestPageSelectionV2026R0 + getDocumentSplitCreateRequestPageSelectionV2026R0() { + return value1; + } + + public boolean isDocumentSplitCreateRequestSmartV2026R0() { + return value2 != null; + } + + public DocumentSplitCreateRequestSmartV2026R0 getDocumentSplitCreateRequestSmartV2026R0() { + return value2; + } + + public String getSplitType() { + return splitType; + } + + static class DocumentSplitCreateRequestTypeV2026R0Deserializer + extends JsonDeserializer { + + public DocumentSplitCreateRequestTypeV2026R0Deserializer() { + super(); + } + + @Override + public DocumentSplitCreateRequestTypeV2026R0 deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + try { + return new DocumentSplitCreateRequestTypeV2026R0( + OneOfThree.OBJECT_MAPPER.convertValue( + node, DocumentSplitCreateRequestManualV2026R0.class)); + } catch (Exception ignored) { + } + try { + return new DocumentSplitCreateRequestTypeV2026R0( + OneOfThree.OBJECT_MAPPER.convertValue( + node, DocumentSplitCreateRequestPageSelectionV2026R0.class)); + } catch (Exception ignored) { + } + try { + return new DocumentSplitCreateRequestTypeV2026R0( + OneOfThree.OBJECT_MAPPER.convertValue( + node, DocumentSplitCreateRequestSmartV2026R0.class)); + } catch (Exception ignored) { + } + throw new JsonMappingException( + jp, "Unable to deserialize DocumentSplitCreateRequestTypeV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0.java new file mode 100644 index 000000000..c09e08f86 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0.java @@ -0,0 +1,352 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0.DocumentSplitCreateRequestManualV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0.DocumentSplitCreateRequestPageSelectionV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestsmartv2026r0.DocumentSplitCreateRequestSmartV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequesttypev2026r0.DocumentSplitCreateRequestTypeV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * The request body for creating a Document Split job. The `split_input` property carries the + * caller-supplied input that determines how the split is performed. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitCreateRequestV2026R0 extends SerializableObject { + + /** The ID of the source file to split. */ + @JsonProperty("source_file_id") + protected final String sourceFileId; + + /** The ID of the folder where the resulting files will be uploaded. */ + @JsonProperty("destination_folder_id") + protected final String destinationFolderId; + + /** The system that initiated the request, used for analytics and traceability. */ + @JsonDeserialize( + using = + DocumentSplitCreateRequestV2026R0InputSourceField + .DocumentSplitCreateRequestV2026R0InputSourceFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateRequestV2026R0InputSourceField + .DocumentSplitCreateRequestV2026R0InputSourceFieldSerializer.class) + @JsonProperty("input_source") + protected final EnumWrapper inputSource; + + @JsonProperty("split_input") + protected final DocumentSplitCreateRequestTypeV2026R0 splitInput; + + /** + * An optional identifier supplied by the caller for this Document Split job. The value is + * returned on job responses for correlation only. It is not a Box resource ID, is not required to + * be unique, and cannot be used to look up the job. + */ + @JsonProperty("external_id") + protected String externalId; + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestManualV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestSmartV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestTypeV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = splitInput; + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestManualV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestSmartV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public DocumentSplitCreateRequestV2026R0( + @JsonProperty("source_file_id") String sourceFileId, + @JsonProperty("destination_folder_id") String destinationFolderId, + @JsonProperty("input_source") + EnumWrapper inputSource, + @JsonProperty("split_input") DocumentSplitCreateRequestTypeV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = splitInput; + } + + protected DocumentSplitCreateRequestV2026R0(Builder builder) { + super(); + this.sourceFileId = builder.sourceFileId; + this.destinationFolderId = builder.destinationFolderId; + this.inputSource = builder.inputSource; + this.splitInput = builder.splitInput; + this.externalId = builder.externalId; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getSourceFileId() { + return sourceFileId; + } + + public String getDestinationFolderId() { + return destinationFolderId; + } + + public EnumWrapper getInputSource() { + return inputSource; + } + + public DocumentSplitCreateRequestTypeV2026R0 getSplitInput() { + return splitInput; + } + + public String getExternalId() { + return externalId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitCreateRequestV2026R0 casted = (DocumentSplitCreateRequestV2026R0) o; + return Objects.equals(sourceFileId, casted.sourceFileId) + && Objects.equals(destinationFolderId, casted.destinationFolderId) + && Objects.equals(inputSource, casted.inputSource) + && Objects.equals(splitInput, casted.splitInput) + && Objects.equals(externalId, casted.externalId); + } + + @Override + public int hashCode() { + return Objects.hash(sourceFileId, destinationFolderId, inputSource, splitInput, externalId); + } + + @Override + public String toString() { + return "DocumentSplitCreateRequestV2026R0{" + + "sourceFileId='" + + sourceFileId + + '\'' + + ", " + + "destinationFolderId='" + + destinationFolderId + + '\'' + + ", " + + "inputSource='" + + inputSource + + '\'' + + ", " + + "splitInput='" + + splitInput + + '\'' + + ", " + + "externalId='" + + externalId + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String sourceFileId; + + protected final String destinationFolderId; + + protected final EnumWrapper inputSource; + + protected final DocumentSplitCreateRequestTypeV2026R0 splitInput; + + protected String externalId; + + public Builder( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestManualV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestSmartV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + DocumentSplitCreateRequestV2026R0InputSourceField inputSource, + DocumentSplitCreateRequestTypeV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = + new EnumWrapper(inputSource); + this.splitInput = splitInput; + } + + public Builder( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestManualV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestSmartV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + } + + public Builder( + String sourceFileId, + String destinationFolderId, + EnumWrapper inputSource, + DocumentSplitCreateRequestTypeV2026R0 splitInput) { + super(); + this.sourceFileId = sourceFileId; + this.destinationFolderId = destinationFolderId; + this.inputSource = inputSource; + this.splitInput = splitInput; + } + + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + + public DocumentSplitCreateRequestV2026R0 build() { + return new DocumentSplitCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0InputSourceField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0InputSourceField.java new file mode 100644 index 000000000..08de09fd6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreaterequestv2026r0/DocumentSplitCreateRequestV2026R0InputSourceField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateRequestV2026R0InputSourceField implements Valuable { + API("api"), + BOX("box"), + RELAY("relay"), + SALESFORCE("salesforce"); + + private final String value; + + DocumentSplitCreateRequestV2026R0InputSourceField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateRequestV2026R0InputSourceFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitCreateRequestV2026R0InputSourceFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateRequestV2026R0InputSourceField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateRequestV2026R0InputSourceFieldSerializer + extends JsonSerializer> { + + public DocumentSplitCreateRequestV2026R0InputSourceFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0.java new file mode 100644 index 000000000..cc4affc37 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0.java @@ -0,0 +1,116 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreateresponsev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A reference to a newly created Document Split job. Returned when a Document Split job is accepted + * for asynchronous processing. Clients can poll the full job representation using this ID. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitCreateResponseV2026R0 extends SerializableObject { + + /** The value will always be `document_split`. */ + @JsonDeserialize( + using = + DocumentSplitCreateResponseV2026R0TypeField + .DocumentSplitCreateResponseV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitCreateResponseV2026R0TypeField + .DocumentSplitCreateResponseV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the created Document Split job. */ + protected final String id; + + public DocumentSplitCreateResponseV2026R0(@JsonProperty("id") String id) { + super(); + this.id = id; + this.type = + new EnumWrapper( + DocumentSplitCreateResponseV2026R0TypeField.DOCUMENT_SPLIT); + } + + protected DocumentSplitCreateResponseV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitCreateResponseV2026R0 casted = (DocumentSplitCreateResponseV2026R0) o; + return Objects.equals(type, casted.type) && Objects.equals(id, casted.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + return "DocumentSplitCreateResponseV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String id; + + public Builder(String id) { + super(); + this.id = id; + } + + public Builder type(DocumentSplitCreateResponseV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public DocumentSplitCreateResponseV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + DocumentSplitCreateResponseV2026R0TypeField.DOCUMENT_SPLIT); + } + return new DocumentSplitCreateResponseV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0TypeField.java new file mode 100644 index 000000000..e776439c7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitcreateresponsev2026r0/DocumentSplitCreateResponseV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitcreateresponsev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitCreateResponseV2026R0TypeField implements Valuable { + DOCUMENT_SPLIT("document_split"); + + private final String value; + + DocumentSplitCreateResponseV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitCreateResponseV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitCreateResponseV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitCreateResponseV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitCreateResponseV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitCreateResponseV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitfailuresv2026r0/DocumentSplitFailuresV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitfailuresv2026r0/DocumentSplitFailuresV2026R0.java new file mode 100644 index 000000000..583ac2c8d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitfailuresv2026r0/DocumentSplitFailuresV2026R0.java @@ -0,0 +1,48 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitfailuresv2026r0; + +import com.box.sdkgen.schemas.v2026r0.documentfailuresv2026r0.DocumentFailuresV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** Errors and warnings that occurred during a Document Split job. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitFailuresV2026R0 extends DocumentFailuresV2026R0 { + + public DocumentSplitFailuresV2026R0( + @JsonProperty("errors") List errors, + @JsonProperty("warnings") List warnings) { + super(errors, warnings); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitFailuresV2026R0 casted = (DocumentSplitFailuresV2026R0) o; + return Objects.equals(errors, casted.errors) && Objects.equals(warnings, casted.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(errors, warnings); + } + + @Override + public String toString() { + return "DocumentSplitFailuresV2026R0{" + + "errors='" + + errors + + '\'' + + ", " + + "warnings='" + + warnings + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitoutputv2026r0/DocumentSplitOutputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitoutputv2026r0/DocumentSplitOutputV2026R0.java new file mode 100644 index 000000000..9c719a508 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitoutputv2026r0/DocumentSplitOutputV2026R0.java @@ -0,0 +1,103 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitoutputv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.documentsplitpagerangev2026r0.DocumentSplitPageRangeV2026R0; +import com.box.sdkgen.schemas.v2026r0.filereferencev2026r0.FileReferenceV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** The set of files produced by a completed Document Split job. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitOutputV2026R0 extends SerializableObject { + + /** References to the files that were created by the split. */ + @JsonProperty("generated_files") + protected List generatedFiles; + + /** + * The page ranges that Box produced for a `smart` split. Each entry corresponds to one generated + * file with the inclusive page range `[start, end]`. Omitted or `null` for `manual` splits, where + * the caller-supplied ranges are available in `split_input.split_definition`. Omitted for + * `page_selection` splits, where the caller-supplied page layout is available in + * `split_input.page_selection`. + */ + @JsonProperty("split_definition") + @Nullable + protected List splitDefinition; + + public DocumentSplitOutputV2026R0() { + super(); + } + + protected DocumentSplitOutputV2026R0(Builder builder) { + super(); + this.generatedFiles = builder.generatedFiles; + this.splitDefinition = builder.splitDefinition; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getGeneratedFiles() { + return generatedFiles; + } + + public List getSplitDefinition() { + return splitDefinition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitOutputV2026R0 casted = (DocumentSplitOutputV2026R0) o; + return Objects.equals(generatedFiles, casted.generatedFiles) + && Objects.equals(splitDefinition, casted.splitDefinition); + } + + @Override + public int hashCode() { + return Objects.hash(generatedFiles, splitDefinition); + } + + @Override + public String toString() { + return "DocumentSplitOutputV2026R0{" + + "generatedFiles='" + + generatedFiles + + '\'' + + ", " + + "splitDefinition='" + + splitDefinition + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected List generatedFiles; + + protected List splitDefinition; + + public Builder generatedFiles(List generatedFiles) { + this.generatedFiles = generatedFiles; + return this; + } + + public Builder splitDefinition(List splitDefinition) { + this.splitDefinition = splitDefinition; + this.markNullableFieldAsSet("split_definition"); + return this; + } + + public DocumentSplitOutputV2026R0 build() { + return new DocumentSplitOutputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpagerangev2026r0/DocumentSplitPageRangeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpagerangev2026r0/DocumentSplitPageRangeV2026R0.java new file mode 100644 index 000000000..f2771264d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpagerangev2026r0/DocumentSplitPageRangeV2026R0.java @@ -0,0 +1,62 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpagerangev2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** An inclusive page range used to define one slice of a manual Document Split job. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitPageRangeV2026R0 extends SerializableObject { + + /** The first page (inclusive) included in this slice. */ + protected final int start; + + /** The last page (inclusive) included in this slice. */ + protected final int end; + + public DocumentSplitPageRangeV2026R0( + @JsonProperty("start") int start, @JsonProperty("end") int end) { + super(); + this.start = start; + this.end = end; + } + + public int getStart() { + return start; + } + + public int getEnd() { + return end; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitPageRangeV2026R0 casted = (DocumentSplitPageRangeV2026R0) o; + return Objects.equals(start, casted.start) && Objects.equals(end, casted.end); + } + + @Override + public int hashCode() { + return Objects.hash(start, end); + } + + @Override + public String toString() { + return "DocumentSplitPageRangeV2026R0{" + + "start='" + + start + + '\'' + + ", " + + "end='" + + end + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionitemv2026r0/DocumentSplitPageSelectionItemV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionitemv2026r0/DocumentSplitPageSelectionItemV2026R0.java new file mode 100644 index 000000000..6bb0015c3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionitemv2026r0/DocumentSplitPageSelectionItemV2026R0.java @@ -0,0 +1,101 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionitemv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionsegmentv2026r0.DocumentSplitPageSelectionSegmentV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** + * A single output file definition within a page selection request. Each item produces one PDF + * containing the pages specified by its segments array. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitPageSelectionItemV2026R0 extends SerializableObject { + + /** + * Optional name for the output file (without extension). When omitted the system generates a + * sequential name based on the source file name. + */ + protected String name; + + /** + * An ordered list of page segments to include in this output file. Each segment specifies either + * a single page or a contiguous page range. + */ + protected final List segments; + + public DocumentSplitPageSelectionItemV2026R0( + @JsonProperty("segments") List segments) { + super(); + this.segments = segments; + } + + protected DocumentSplitPageSelectionItemV2026R0(Builder builder) { + super(); + this.name = builder.name; + this.segments = builder.segments; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getName() { + return name; + } + + public List getSegments() { + return segments; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitPageSelectionItemV2026R0 casted = (DocumentSplitPageSelectionItemV2026R0) o; + return Objects.equals(name, casted.name) && Objects.equals(segments, casted.segments); + } + + @Override + public int hashCode() { + return Objects.hash(name, segments); + } + + @Override + public String toString() { + return "DocumentSplitPageSelectionItemV2026R0{" + + "name='" + + name + + '\'' + + ", " + + "segments='" + + segments + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected String name; + + protected final List segments; + + public Builder(List segments) { + super(); + this.segments = segments; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public DocumentSplitPageSelectionItemV2026R0 build() { + return new DocumentSplitPageSelectionItemV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0.java new file mode 100644 index 000000000..afdc9fa0e --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0.java @@ -0,0 +1,133 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionpagerangev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A page selection segment that includes an inclusive page range from the source document. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitPageSelectionPageRangeV2026R0 extends SerializableObject { + + /** Discriminator. Must be `page_range` for this variant. */ + @JsonDeserialize( + using = + DocumentSplitPageSelectionPageRangeV2026R0TypeField + .DocumentSplitPageSelectionPageRangeV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitPageSelectionPageRangeV2026R0TypeField + .DocumentSplitPageSelectionPageRangeV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The first page (inclusive) included in this segment. */ + protected final int start; + + /** The last page (inclusive) included in this segment. */ + protected final int end; + + public DocumentSplitPageSelectionPageRangeV2026R0( + @JsonProperty("start") int start, @JsonProperty("end") int end) { + super(); + this.start = start; + this.end = end; + this.type = + new EnumWrapper( + DocumentSplitPageSelectionPageRangeV2026R0TypeField.PAGE_RANGE); + } + + protected DocumentSplitPageSelectionPageRangeV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.start = builder.start; + this.end = builder.end; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public int getStart() { + return start; + } + + public int getEnd() { + return end; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitPageSelectionPageRangeV2026R0 casted = + (DocumentSplitPageSelectionPageRangeV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(start, casted.start) + && Objects.equals(end, casted.end); + } + + @Override + public int hashCode() { + return Objects.hash(type, start, end); + } + + @Override + public String toString() { + return "DocumentSplitPageSelectionPageRangeV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "start='" + + start + + '\'' + + ", " + + "end='" + + end + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final int start; + + protected final int end; + + public Builder(int start, int end) { + super(); + this.start = start; + this.end = end; + } + + public Builder type(DocumentSplitPageSelectionPageRangeV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public DocumentSplitPageSelectionPageRangeV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + DocumentSplitPageSelectionPageRangeV2026R0TypeField.PAGE_RANGE); + } + return new DocumentSplitPageSelectionPageRangeV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0TypeField.java new file mode 100644 index 000000000..877ed631d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionpagerangev2026r0/DocumentSplitPageSelectionPageRangeV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionpagerangev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitPageSelectionPageRangeV2026R0TypeField implements Valuable { + PAGE_RANGE("page_range"); + + private final String value; + + DocumentSplitPageSelectionPageRangeV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitPageSelectionPageRangeV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitPageSelectionPageRangeV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitPageSelectionPageRangeV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitPageSelectionPageRangeV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitPageSelectionPageRangeV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsegmentv2026r0/DocumentSplitPageSelectionSegmentV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsegmentv2026r0/DocumentSplitPageSelectionSegmentV2026R0.java new file mode 100644 index 000000000..bad8ae34a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsegmentv2026r0/DocumentSplitPageSelectionSegmentV2026R0.java @@ -0,0 +1,88 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionsegmentv2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionpagerangev2026r0.DocumentSplitPageSelectionPageRangeV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionsinglepagev2026r0.DocumentSplitPageSelectionSinglePageV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = + DocumentSplitPageSelectionSegmentV2026R0 + .DocumentSplitPageSelectionSegmentV2026R0Deserializer.class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class DocumentSplitPageSelectionSegmentV2026R0 + extends OneOfTwo< + DocumentSplitPageSelectionSinglePageV2026R0, DocumentSplitPageSelectionPageRangeV2026R0> { + + protected final String type; + + public DocumentSplitPageSelectionSegmentV2026R0( + DocumentSplitPageSelectionSinglePageV2026R0 documentSplitPageSelectionSinglePageV2026R0) { + super(documentSplitPageSelectionSinglePageV2026R0, null); + this.type = EnumWrapper.convertToString(documentSplitPageSelectionSinglePageV2026R0.getType()); + } + + public DocumentSplitPageSelectionSegmentV2026R0( + DocumentSplitPageSelectionPageRangeV2026R0 documentSplitPageSelectionPageRangeV2026R0) { + super(null, documentSplitPageSelectionPageRangeV2026R0); + this.type = EnumWrapper.convertToString(documentSplitPageSelectionPageRangeV2026R0.getType()); + } + + public boolean isDocumentSplitPageSelectionSinglePageV2026R0() { + return value0 != null; + } + + public DocumentSplitPageSelectionSinglePageV2026R0 + getDocumentSplitPageSelectionSinglePageV2026R0() { + return value0; + } + + public boolean isDocumentSplitPageSelectionPageRangeV2026R0() { + return value1 != null; + } + + public DocumentSplitPageSelectionPageRangeV2026R0 + getDocumentSplitPageSelectionPageRangeV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + static class DocumentSplitPageSelectionSegmentV2026R0Deserializer + extends JsonDeserializer { + + public DocumentSplitPageSelectionSegmentV2026R0Deserializer() { + super(); + } + + @Override + public DocumentSplitPageSelectionSegmentV2026R0 deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "single_page": + return new DocumentSplitPageSelectionSegmentV2026R0( + JsonManager.deserialize(node, DocumentSplitPageSelectionSinglePageV2026R0.class)); + case "page_range": + return new DocumentSplitPageSelectionSegmentV2026R0( + JsonManager.deserialize(node, DocumentSplitPageSelectionPageRangeV2026R0.class)); + } + } + throw new JsonMappingException( + jp, "Unable to deserialize DocumentSplitPageSelectionSegmentV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0.java new file mode 100644 index 000000000..abf13e25c --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0.java @@ -0,0 +1,114 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionsinglepagev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A page selection segment that includes a single page from the source document. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitPageSelectionSinglePageV2026R0 extends SerializableObject { + + /** Discriminator. Must be `single_page` for this variant. */ + @JsonDeserialize( + using = + DocumentSplitPageSelectionSinglePageV2026R0TypeField + .DocumentSplitPageSelectionSinglePageV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + DocumentSplitPageSelectionSinglePageV2026R0TypeField + .DocumentSplitPageSelectionSinglePageV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** A single page number to include. */ + protected final int page; + + public DocumentSplitPageSelectionSinglePageV2026R0(@JsonProperty("page") int page) { + super(); + this.page = page; + this.type = + new EnumWrapper( + DocumentSplitPageSelectionSinglePageV2026R0TypeField.SINGLE_PAGE); + } + + protected DocumentSplitPageSelectionSinglePageV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.page = builder.page; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public int getPage() { + return page; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitPageSelectionSinglePageV2026R0 casted = + (DocumentSplitPageSelectionSinglePageV2026R0) o; + return Objects.equals(type, casted.type) && Objects.equals(page, casted.page); + } + + @Override + public int hashCode() { + return Objects.hash(type, page); + } + + @Override + public String toString() { + return "DocumentSplitPageSelectionSinglePageV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "page='" + + page + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final int page; + + public Builder(int page) { + super(); + this.page = page; + } + + public Builder type(DocumentSplitPageSelectionSinglePageV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public DocumentSplitPageSelectionSinglePageV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + DocumentSplitPageSelectionSinglePageV2026R0TypeField.SINGLE_PAGE); + } + return new DocumentSplitPageSelectionSinglePageV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0TypeField.java new file mode 100644 index 000000000..5386e308d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitpageselectionsinglepagev2026r0/DocumentSplitPageSelectionSinglePageV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitpageselectionsinglepagev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitPageSelectionSinglePageV2026R0TypeField implements Valuable { + SINGLE_PAGE("single_page"); + + private final String value; + + DocumentSplitPageSelectionSinglePageV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitPageSelectionSinglePageV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitPageSelectionSinglePageV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitPageSelectionSinglePageV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitPageSelectionSinglePageV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitPageSelectionSinglePageV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitsv2026r0/DocumentSplitsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitsv2026r0/DocumentSplitsV2026R0.java new file mode 100644 index 000000000..9e5130938 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitsv2026r0/DocumentSplitsV2026R0.java @@ -0,0 +1,118 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0.DocumentSplitV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of Document Split jobs. */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitsV2026R0 extends SerializableObject { + + /** A list of Document Split jobs. */ + protected List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + public DocumentSplitsV2026R0() { + super(); + } + + protected DocumentSplitsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitsV2026R0 casted = (DocumentSplitsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker); + } + + @Override + public String toString() { + return "DocumentSplitsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected List entries; + + protected Long limit; + + protected String nextMarker; + + public Builder entries(List entries) { + this.entries = entries; + return this; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public DocumentSplitsV2026R0 build() { + return new DocumentSplitsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0.java new file mode 100644 index 000000000..3b6db009d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0.java @@ -0,0 +1,903 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestmanualv2026r0.DocumentSplitCreateRequestManualV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestpageselectionv2026r0.DocumentSplitCreateRequestPageSelectionV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequestsmartv2026r0.DocumentSplitCreateRequestSmartV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitcreaterequesttypev2026r0.DocumentSplitCreateRequestTypeV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitfailuresv2026r0.DocumentSplitFailuresV2026R0; +import com.box.sdkgen.schemas.v2026r0.documentsplitoutputv2026r0.DocumentSplitOutputV2026R0; +import com.box.sdkgen.schemas.v2026r0.enterprisereferencev2026r0.EnterpriseReferenceV2026R0; +import com.box.sdkgen.schemas.v2026r0.filereferencev2026r0.FileReferenceV2026R0; +import com.box.sdkgen.schemas.v2026r0.folderreferencev2026r0.FolderReferenceV2026R0; +import com.box.sdkgen.schemas.v2026r0.userminiv2026r0.UserMiniV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * A standard representation of a Document Split job. The job represents a request to split a + * paginated source document into multiple files based on either a manual set of page ranges, a + * non-linear page selection, or a smart prompt-driven analysis. + */ +@JsonFilter("nullablePropertyFilter") +public class DocumentSplitV2026R0 extends SerializableObject { + + /** The unique identifier for the Document Split job. */ + protected final String id; + + /** The value will always be `document_split`. */ + @JsonDeserialize( + using = DocumentSplitV2026R0TypeField.DocumentSplitV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = DocumentSplitV2026R0TypeField.DocumentSplitV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + @JsonProperty("source_file") + protected final FileReferenceV2026R0 sourceFile; + + /** The current state of the Document Split job. */ + @JsonDeserialize( + using = DocumentSplitV2026R0StatusField.DocumentSplitV2026R0StatusFieldDeserializer.class) + @JsonSerialize( + using = DocumentSplitV2026R0StatusField.DocumentSplitV2026R0StatusFieldSerializer.class) + protected final EnumWrapper status; + + @JsonProperty("split_input") + protected final DocumentSplitCreateRequestTypeV2026R0 splitInput; + + /** The result of the Document Split job. `null` until the job has produced output. */ + protected DocumentSplitOutputV2026R0 output; + + @JsonProperty("destination_folder") + protected final FolderReferenceV2026R0 destinationFolder; + + /** The system that initiated the request, used for analytics and traceability. */ + @JsonDeserialize( + using = + DocumentSplitV2026R0InputSourceField.DocumentSplitV2026R0InputSourceFieldDeserializer + .class) + @JsonSerialize( + using = + DocumentSplitV2026R0InputSourceField.DocumentSplitV2026R0InputSourceFieldSerializer.class) + @JsonProperty("input_source") + protected final EnumWrapper inputSource; + + /** When the Document Split job was created. */ + @JsonProperty("created_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + protected OffsetDateTime createdAt; + + @JsonProperty("created_by") + protected UserMiniV2026R0 createdBy; + + protected EnterpriseReferenceV2026R0 enterprise; + + /** + * Errors and warnings that occurred during the document split. `null` when no failures were + * recorded. + */ + protected DocumentSplitFailuresV2026R0 failures; + + /** + * An optional identifier supplied by the caller when the Document Split job was created. Returned + * for correlation only. It is not a Box resource ID, is not required to be unique, and cannot be + * used to look up the job. + */ + @JsonProperty("external_id") + protected String externalId; + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + public DocumentSplitV2026R0( + @JsonProperty("id") String id, + @JsonProperty("source_file") FileReferenceV2026R0 sourceFile, + @JsonProperty("status") EnumWrapper status, + @JsonProperty("split_input") DocumentSplitCreateRequestTypeV2026R0 splitInput, + @JsonProperty("destination_folder") FolderReferenceV2026R0 destinationFolder, + @JsonProperty("input_source") EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + + protected DocumentSplitV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.sourceFile = builder.sourceFile; + this.status = builder.status; + this.splitInput = builder.splitInput; + this.output = builder.output; + this.destinationFolder = builder.destinationFolder; + this.inputSource = builder.inputSource; + this.createdAt = builder.createdAt; + this.createdBy = builder.createdBy; + this.enterprise = builder.enterprise; + this.failures = builder.failures; + this.externalId = builder.externalId; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public FileReferenceV2026R0 getSourceFile() { + return sourceFile; + } + + public EnumWrapper getStatus() { + return status; + } + + public DocumentSplitCreateRequestTypeV2026R0 getSplitInput() { + return splitInput; + } + + public DocumentSplitOutputV2026R0 getOutput() { + return output; + } + + public FolderReferenceV2026R0 getDestinationFolder() { + return destinationFolder; + } + + public EnumWrapper getInputSource() { + return inputSource; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public UserMiniV2026R0 getCreatedBy() { + return createdBy; + } + + public EnterpriseReferenceV2026R0 getEnterprise() { + return enterprise; + } + + public DocumentSplitFailuresV2026R0 getFailures() { + return failures; + } + + public String getExternalId() { + return externalId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentSplitV2026R0 casted = (DocumentSplitV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(sourceFile, casted.sourceFile) + && Objects.equals(status, casted.status) + && Objects.equals(splitInput, casted.splitInput) + && Objects.equals(output, casted.output) + && Objects.equals(destinationFolder, casted.destinationFolder) + && Objects.equals(inputSource, casted.inputSource) + && Objects.equals(createdAt, casted.createdAt) + && Objects.equals(createdBy, casted.createdBy) + && Objects.equals(enterprise, casted.enterprise) + && Objects.equals(failures, casted.failures) + && Objects.equals(externalId, casted.externalId); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + sourceFile, + status, + splitInput, + output, + destinationFolder, + inputSource, + createdAt, + createdBy, + enterprise, + failures, + externalId); + } + + @Override + public String toString() { + return "DocumentSplitV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "sourceFile='" + + sourceFile + + '\'' + + ", " + + "status='" + + status + + '\'' + + ", " + + "splitInput='" + + splitInput + + '\'' + + ", " + + "output='" + + output + + '\'' + + ", " + + "destinationFolder='" + + destinationFolder + + '\'' + + ", " + + "inputSource='" + + inputSource + + '\'' + + ", " + + "createdAt='" + + createdAt + + '\'' + + ", " + + "createdBy='" + + createdBy + + '\'' + + ", " + + "enterprise='" + + enterprise + + '\'' + + ", " + + "failures='" + + failures + + '\'' + + ", " + + "externalId='" + + externalId + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final FileReferenceV2026R0 sourceFile; + + protected final EnumWrapper status; + + protected final DocumentSplitCreateRequestTypeV2026R0 splitInput; + + protected DocumentSplitOutputV2026R0 output; + + protected final FolderReferenceV2026R0 destinationFolder; + + protected final EnumWrapper inputSource; + + protected OffsetDateTime createdAt; + + protected UserMiniV2026R0 createdBy; + + protected EnterpriseReferenceV2026R0 enterprise; + + protected DocumentSplitFailuresV2026R0 failures; + + protected String externalId; + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + DocumentSplitV2026R0StatusField status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = new EnumWrapper(status); + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestManualV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestPageSelectionV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestSmartV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = new DocumentSplitCreateRequestTypeV2026R0(splitInput); + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + DocumentSplitV2026R0InputSourceField inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = new EnumWrapper(inputSource); + } + + public Builder( + String id, + FileReferenceV2026R0 sourceFile, + EnumWrapper status, + DocumentSplitCreateRequestTypeV2026R0 splitInput, + FolderReferenceV2026R0 destinationFolder, + EnumWrapper inputSource) { + super(); + this.id = id; + this.sourceFile = sourceFile; + this.status = status; + this.splitInput = splitInput; + this.destinationFolder = destinationFolder; + this.inputSource = inputSource; + } + + public Builder type(DocumentSplitV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder output(DocumentSplitOutputV2026R0 output) { + this.output = output; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdBy(UserMiniV2026R0 createdBy) { + this.createdBy = createdBy; + return this; + } + + public Builder enterprise(EnterpriseReferenceV2026R0 enterprise) { + this.enterprise = enterprise; + return this; + } + + public Builder failures(DocumentSplitFailuresV2026R0 failures) { + this.failures = failures; + return this; + } + + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + + public DocumentSplitV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT); + } + return new DocumentSplitV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0InputSourceField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0InputSourceField.java new file mode 100644 index 000000000..09902491c --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0InputSourceField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitV2026R0InputSourceField implements Valuable { + API("api"), + BOX("box"), + RELAY("relay"), + SALESFORCE("salesforce"); + + private final String value; + + DocumentSplitV2026R0InputSourceField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitV2026R0InputSourceFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitV2026R0InputSourceFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitV2026R0InputSourceField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitV2026R0InputSourceFieldSerializer + extends JsonSerializer> { + + public DocumentSplitV2026R0InputSourceFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0StatusField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0StatusField.java new file mode 100644 index 000000000..e1e16c83f --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0StatusField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitV2026R0StatusField implements Valuable { + SUBMITTED("submitted"), + COMPLETED("completed"), + FAILED("failed"), + COMPLETED_WITH_ERROR("completed_with_error"); + + private final String value; + + DocumentSplitV2026R0StatusField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitV2026R0StatusFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitV2026R0StatusFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitV2026R0StatusField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitV2026R0StatusFieldSerializer + extends JsonSerializer> { + + public DocumentSplitV2026R0StatusFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0TypeField.java new file mode 100644 index 000000000..520f25115 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/documentsplitv2026r0/DocumentSplitV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.documentsplitv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum DocumentSplitV2026R0TypeField implements Valuable { + DOCUMENT_SPLIT("document_split"); + + private final String value; + + DocumentSplitV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class DocumentSplitV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public DocumentSplitV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(DocumentSplitV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class DocumentSplitV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public DocumentSplitV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0.java new file mode 100644 index 000000000..e2f25a813 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0.java @@ -0,0 +1,103 @@ +package com.box.sdkgen.schemas.v2026r0.enterprisereferencev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A reference to an enterprise, used when nested within another resource. */ +@JsonFilter("nullablePropertyFilter") +public class EnterpriseReferenceV2026R0 extends SerializableObject { + + /** The unique identifier for this enterprise. */ + protected final String id; + + /** The value will always be `enterprise`. */ + @JsonDeserialize( + using = + EnterpriseReferenceV2026R0TypeField.EnterpriseReferenceV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + EnterpriseReferenceV2026R0TypeField.EnterpriseReferenceV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + public EnterpriseReferenceV2026R0(@JsonProperty("id") String id) { + super(); + this.id = id; + this.type = + new EnumWrapper( + EnterpriseReferenceV2026R0TypeField.ENTERPRISE); + } + + protected EnterpriseReferenceV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnterpriseReferenceV2026R0 casted = (EnterpriseReferenceV2026R0) o; + return Objects.equals(id, casted.id) && Objects.equals(type, casted.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + return "EnterpriseReferenceV2026R0{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + public Builder(String id) { + super(); + this.id = id; + } + + public Builder type(EnterpriseReferenceV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public EnterpriseReferenceV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + EnterpriseReferenceV2026R0TypeField.ENTERPRISE); + } + return new EnterpriseReferenceV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0TypeField.java new file mode 100644 index 000000000..3612183bb --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/enterprisereferencev2026r0/EnterpriseReferenceV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.enterprisereferencev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum EnterpriseReferenceV2026R0TypeField implements Valuable { + ENTERPRISE("enterprise"); + + private final String value; + + EnterpriseReferenceV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class EnterpriseReferenceV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public EnterpriseReferenceV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(EnterpriseReferenceV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class EnterpriseReferenceV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public EnterpriseReferenceV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0.java new file mode 100644 index 000000000..1d53fe36e --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0.java @@ -0,0 +1,98 @@ +package com.box.sdkgen.schemas.v2026r0.filereferencev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** File reference. */ +@JsonFilter("nullablePropertyFilter") +public class FileReferenceV2026R0 extends SerializableObject { + + /** The value will always be `file`. */ + @JsonDeserialize( + using = FileReferenceV2026R0TypeField.FileReferenceV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = FileReferenceV2026R0TypeField.FileReferenceV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** ID of the file. */ + protected final String id; + + public FileReferenceV2026R0(@JsonProperty("id") String id) { + super(); + this.id = id; + this.type = new EnumWrapper(FileReferenceV2026R0TypeField.FILE); + } + + protected FileReferenceV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileReferenceV2026R0 casted = (FileReferenceV2026R0) o; + return Objects.equals(type, casted.type) && Objects.equals(id, casted.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + return "FileReferenceV2026R0{" + "type='" + type + '\'' + ", " + "id='" + id + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String id; + + public Builder(String id) { + super(); + this.id = id; + } + + public Builder type(FileReferenceV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public FileReferenceV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper(FileReferenceV2026R0TypeField.FILE); + } + return new FileReferenceV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0TypeField.java new file mode 100644 index 000000000..3efd21fa7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/filereferencev2026r0/FileReferenceV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.filereferencev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum FileReferenceV2026R0TypeField implements Valuable { + FILE("file"); + + private final String value; + + FileReferenceV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class FileReferenceV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public FileReferenceV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(FileReferenceV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class FileReferenceV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public FileReferenceV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttleagentcredentialsv2026r0/ShuttleAgentCredentialsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttleagentcredentialsv2026r0/ShuttleAgentCredentialsV2026R0.java new file mode 100644 index 000000000..677158a84 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttleagentcredentialsv2026r0/ShuttleAgentCredentialsV2026R0.java @@ -0,0 +1,75 @@ +package com.box.sdkgen.schemas.v2026r0.shuttleagentcredentialsv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * The installation credentials issued for a Windows shuttle system. The registration token is + * pasted into the Windows agent installer to register the agent with its system. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleAgentCredentialsV2026R0 extends SerializableObject { + + /** The installation token to paste into the Windows agent installer to register the agent. */ + @JsonProperty("registration_token") + protected final String registrationToken; + + /** When the registration token expires and can no longer be used. */ + @JsonProperty("expires_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + protected final OffsetDateTime expiresAt; + + public ShuttleAgentCredentialsV2026R0( + @JsonProperty("registration_token") String registrationToken, + @JsonProperty("expires_at") OffsetDateTime expiresAt) { + super(); + this.registrationToken = registrationToken; + this.expiresAt = expiresAt; + } + + public String getRegistrationToken() { + return registrationToken; + } + + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleAgentCredentialsV2026R0 casted = (ShuttleAgentCredentialsV2026R0) o; + return Objects.equals(registrationToken, casted.registrationToken) + && Objects.equals(expiresAt, casted.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(registrationToken, expiresAt); + } + + @Override + public String toString() { + return "ShuttleAgentCredentialsV2026R0{" + + "registrationToken='" + + registrationToken + + '\'' + + ", " + + "expiresAt='" + + expiresAt + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectsv2026r0/ShuttleDiscoveredSubjectsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectsv2026r0/ShuttleDiscoveredSubjectsV2026R0.java new file mode 100644 index 000000000..6b57366e2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectsv2026r0/ShuttleDiscoveredSubjectsV2026R0.java @@ -0,0 +1,143 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlediscoveredsubjectsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlediscoveredsubjectv2026r0.ShuttleDiscoveredSubjectV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of subjects discovered on the source system. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleDiscoveredSubjectsV2026R0 extends SerializableObject { + + /** A list of discovered subjects. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleDiscoveredSubjectsV2026R0( + @JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleDiscoveredSubjectsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleDiscoveredSubjectsV2026R0 casted = (ShuttleDiscoveredSubjectsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleDiscoveredSubjectsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleDiscoveredSubjectsV2026R0 build() { + return new ShuttleDiscoveredSubjectsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0.java new file mode 100644 index 000000000..52187b954 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0.java @@ -0,0 +1,194 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlediscoveredsubjectv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectv2026r0.ShuttleSubjectV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectv2026r0.ShuttleTargetSubjectV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A subject discovered on the source system during a scan, with an optional suggested Box target. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleDiscoveredSubjectV2026R0 extends SerializableObject { + + /** The unique identifier for the discovered subject. */ + protected final String id; + + /** The value will always be `shuttle_discovered_subject`. */ + @JsonDeserialize( + using = + ShuttleDiscoveredSubjectV2026R0TypeField + .ShuttleDiscoveredSubjectV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleDiscoveredSubjectV2026R0TypeField + .ShuttleDiscoveredSubjectV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this subject belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** The scan revision this discovered subject belongs to. */ + protected final int revision; + + protected final ShuttleSubjectV2026R0 source; + + /** A suggested Box target inferred during the scan. `null` when no suggestion was made. */ + @JsonProperty("suggested_target") + protected ShuttleTargetSubjectV2026R0 suggestedTarget; + + public ShuttleDiscoveredSubjectV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("revision") int revision, + @JsonProperty("source") ShuttleSubjectV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.revision = revision; + this.source = source; + this.type = + new EnumWrapper( + ShuttleDiscoveredSubjectV2026R0TypeField.SHUTTLE_DISCOVERED_SUBJECT); + } + + protected ShuttleDiscoveredSubjectV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.revision = builder.revision; + this.source = builder.source; + this.suggestedTarget = builder.suggestedTarget; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public int getRevision() { + return revision; + } + + public ShuttleSubjectV2026R0 getSource() { + return source; + } + + public ShuttleTargetSubjectV2026R0 getSuggestedTarget() { + return suggestedTarget; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleDiscoveredSubjectV2026R0 casted = (ShuttleDiscoveredSubjectV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(revision, casted.revision) + && Objects.equals(source, casted.source) + && Objects.equals(suggestedTarget, casted.suggestedTarget); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, jobId, revision, source, suggestedTarget); + } + + @Override + public String toString() { + return "ShuttleDiscoveredSubjectV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "revision='" + + revision + + '\'' + + ", " + + "source='" + + source + + '\'' + + ", " + + "suggestedTarget='" + + suggestedTarget + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected final int revision; + + protected final ShuttleSubjectV2026R0 source; + + protected ShuttleTargetSubjectV2026R0 suggestedTarget; + + public Builder(String id, String jobId, int revision, ShuttleSubjectV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.revision = revision; + this.source = source; + } + + public Builder type(ShuttleDiscoveredSubjectV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder suggestedTarget(ShuttleTargetSubjectV2026R0 suggestedTarget) { + this.suggestedTarget = suggestedTarget; + return this; + } + + public ShuttleDiscoveredSubjectV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleDiscoveredSubjectV2026R0TypeField.SHUTTLE_DISCOVERED_SUBJECT); + } + return new ShuttleDiscoveredSubjectV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0TypeField.java new file mode 100644 index 000000000..88d4d9240 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlediscoveredsubjectv2026r0/ShuttleDiscoveredSubjectV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlediscoveredsubjectv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleDiscoveredSubjectV2026R0TypeField implements Valuable { + SHUTTLE_DISCOVERED_SUBJECT("shuttle_discovered_subject"); + + private final String value; + + ShuttleDiscoveredSubjectV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleDiscoveredSubjectV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleDiscoveredSubjectV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleDiscoveredSubjectV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleDiscoveredSubjectV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleDiscoveredSubjectV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0.java new file mode 100644 index 000000000..d377ba46a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0.java @@ -0,0 +1,226 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** The request body used to create a new shuttle job. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobCreateRequestV2026R0 extends SerializableObject { + + /** The human-readable name of the shuttle job. */ + protected final String name; + + /** The type of work the shuttle job performs. */ + @JsonDeserialize( + using = + ShuttleJobCreateRequestV2026R0JobTypeField + .ShuttleJobCreateRequestV2026R0JobTypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobCreateRequestV2026R0JobTypeField + .ShuttleJobCreateRequestV2026R0JobTypeFieldSerializer.class) + @JsonProperty("job_type") + protected final EnumWrapper jobType; + + /** The unique identifier of the source system to migrate from. */ + @JsonProperty("source_system_id") + protected final String sourceSystemId; + + /** An optional free-form comment describing the shuttle job. */ + protected String comment; + + /** A list of free-form tags associated with the shuttle job. */ + protected List tags; + + /** + * The account mapping configuration that controls how source identities and permissions are + * translated into Box. When this object is omitted, the job is created with `is_enabled` set to + * `false`. + */ + @JsonProperty("account_mapping") + protected ShuttleJobCreateRequestV2026R0AccountMappingField accountMapping; + + /** The tunable settings that control how the shuttle job runs. */ + protected ShuttleJobCreateRequestV2026R0SettingsField settings; + + public ShuttleJobCreateRequestV2026R0( + String name, ShuttleJobCreateRequestV2026R0JobTypeField jobType, String sourceSystemId) { + super(); + this.name = name; + this.jobType = new EnumWrapper(jobType); + this.sourceSystemId = sourceSystemId; + } + + public ShuttleJobCreateRequestV2026R0( + @JsonProperty("name") String name, + @JsonProperty("job_type") EnumWrapper jobType, + @JsonProperty("source_system_id") String sourceSystemId) { + super(); + this.name = name; + this.jobType = jobType; + this.sourceSystemId = sourceSystemId; + } + + protected ShuttleJobCreateRequestV2026R0(Builder builder) { + super(); + this.name = builder.name; + this.jobType = builder.jobType; + this.sourceSystemId = builder.sourceSystemId; + this.comment = builder.comment; + this.tags = builder.tags; + this.accountMapping = builder.accountMapping; + this.settings = builder.settings; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getName() { + return name; + } + + public EnumWrapper getJobType() { + return jobType; + } + + public String getSourceSystemId() { + return sourceSystemId; + } + + public String getComment() { + return comment; + } + + public List getTags() { + return tags; + } + + public ShuttleJobCreateRequestV2026R0AccountMappingField getAccountMapping() { + return accountMapping; + } + + public ShuttleJobCreateRequestV2026R0SettingsField getSettings() { + return settings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobCreateRequestV2026R0 casted = (ShuttleJobCreateRequestV2026R0) o; + return Objects.equals(name, casted.name) + && Objects.equals(jobType, casted.jobType) + && Objects.equals(sourceSystemId, casted.sourceSystemId) + && Objects.equals(comment, casted.comment) + && Objects.equals(tags, casted.tags) + && Objects.equals(accountMapping, casted.accountMapping) + && Objects.equals(settings, casted.settings); + } + + @Override + public int hashCode() { + return Objects.hash(name, jobType, sourceSystemId, comment, tags, accountMapping, settings); + } + + @Override + public String toString() { + return "ShuttleJobCreateRequestV2026R0{" + + "name='" + + name + + '\'' + + ", " + + "jobType='" + + jobType + + '\'' + + ", " + + "sourceSystemId='" + + sourceSystemId + + '\'' + + ", " + + "comment='" + + comment + + '\'' + + ", " + + "tags='" + + tags + + '\'' + + ", " + + "accountMapping='" + + accountMapping + + '\'' + + ", " + + "settings='" + + settings + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String name; + + protected final EnumWrapper jobType; + + protected final String sourceSystemId; + + protected String comment; + + protected List tags; + + protected ShuttleJobCreateRequestV2026R0AccountMappingField accountMapping; + + protected ShuttleJobCreateRequestV2026R0SettingsField settings; + + public Builder( + String name, ShuttleJobCreateRequestV2026R0JobTypeField jobType, String sourceSystemId) { + super(); + this.name = name; + this.jobType = new EnumWrapper(jobType); + this.sourceSystemId = sourceSystemId; + } + + public Builder( + String name, + EnumWrapper jobType, + String sourceSystemId) { + super(); + this.name = name; + this.jobType = jobType; + this.sourceSystemId = sourceSystemId; + } + + public Builder comment(String comment) { + this.comment = comment; + return this; + } + + public Builder tags(List tags) { + this.tags = tags; + return this; + } + + public Builder accountMapping( + ShuttleJobCreateRequestV2026R0AccountMappingField accountMapping) { + this.accountMapping = accountMapping; + return this; + } + + public Builder settings(ShuttleJobCreateRequestV2026R0SettingsField settings) { + this.settings = settings; + return this; + } + + public ShuttleJobCreateRequestV2026R0 build() { + return new ShuttleJobCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0AccountMappingField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0AccountMappingField.java new file mode 100644 index 000000000..c7bb32257 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0AccountMappingField.java @@ -0,0 +1,157 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobpermissionconflictstrategyv2026r0.ShuttleJobPermissionConflictStrategyV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobCreateRequestV2026R0AccountMappingField extends SerializableObject { + + /** + * Whether account mapping is enabled for the shuttle job. Defaults to `false` when + * `account_mapping` is omitted on create. + */ + @JsonProperty("is_enabled") + protected Boolean isEnabled; + + /** The strategy used to resolve permission conflicts. `null` when unset. */ + @JsonDeserialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Deserializer.class) + @JsonSerialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Serializer.class) + @JsonProperty("permission_conflict_strategy") + protected EnumWrapper permissionConflictStrategy; + + /** Whether external shares are mapped during the migration. */ + @JsonProperty("are_external_shares_mapped") + protected Boolean areExternalSharesMapped; + + /** Whether permissions are mapped during the migration. */ + @JsonProperty("are_permissions_mapped") + protected Boolean arePermissionsMapped; + + public ShuttleJobCreateRequestV2026R0AccountMappingField() { + super(); + } + + protected ShuttleJobCreateRequestV2026R0AccountMappingField(Builder builder) { + super(); + this.isEnabled = builder.isEnabled; + this.permissionConflictStrategy = builder.permissionConflictStrategy; + this.areExternalSharesMapped = builder.areExternalSharesMapped; + this.arePermissionsMapped = builder.arePermissionsMapped; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Boolean getIsEnabled() { + return isEnabled; + } + + public EnumWrapper getPermissionConflictStrategy() { + return permissionConflictStrategy; + } + + public Boolean getAreExternalSharesMapped() { + return areExternalSharesMapped; + } + + public Boolean getArePermissionsMapped() { + return arePermissionsMapped; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobCreateRequestV2026R0AccountMappingField casted = + (ShuttleJobCreateRequestV2026R0AccountMappingField) o; + return Objects.equals(isEnabled, casted.isEnabled) + && Objects.equals(permissionConflictStrategy, casted.permissionConflictStrategy) + && Objects.equals(areExternalSharesMapped, casted.areExternalSharesMapped) + && Objects.equals(arePermissionsMapped, casted.arePermissionsMapped); + } + + @Override + public int hashCode() { + return Objects.hash( + isEnabled, permissionConflictStrategy, areExternalSharesMapped, arePermissionsMapped); + } + + @Override + public String toString() { + return "ShuttleJobCreateRequestV2026R0AccountMappingField{" + + "isEnabled='" + + isEnabled + + '\'' + + ", " + + "permissionConflictStrategy='" + + permissionConflictStrategy + + '\'' + + ", " + + "areExternalSharesMapped='" + + areExternalSharesMapped + + '\'' + + ", " + + "arePermissionsMapped='" + + arePermissionsMapped + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Boolean isEnabled; + + protected EnumWrapper permissionConflictStrategy; + + protected Boolean areExternalSharesMapped; + + protected Boolean arePermissionsMapped; + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + public Builder permissionConflictStrategy( + ShuttleJobPermissionConflictStrategyV2026R0 permissionConflictStrategy) { + this.permissionConflictStrategy = + new EnumWrapper(permissionConflictStrategy); + return this; + } + + public Builder permissionConflictStrategy( + EnumWrapper permissionConflictStrategy) { + this.permissionConflictStrategy = permissionConflictStrategy; + return this; + } + + public Builder areExternalSharesMapped(Boolean areExternalSharesMapped) { + this.areExternalSharesMapped = areExternalSharesMapped; + return this; + } + + public Builder arePermissionsMapped(Boolean arePermissionsMapped) { + this.arePermissionsMapped = arePermissionsMapped; + return this; + } + + public ShuttleJobCreateRequestV2026R0AccountMappingField build() { + return new ShuttleJobCreateRequestV2026R0AccountMappingField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0JobTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0JobTypeField.java new file mode 100644 index 000000000..d101bf263 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0JobTypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobcreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobCreateRequestV2026R0JobTypeField implements Valuable { + TRANSFER("transfer"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobCreateRequestV2026R0JobTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobCreateRequestV2026R0JobTypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobCreateRequestV2026R0JobTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobCreateRequestV2026R0JobTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobCreateRequestV2026R0JobTypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobCreateRequestV2026R0JobTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0SettingsField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0SettingsField.java new file mode 100644 index 000000000..819bc1600 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobcreaterequestv2026r0/ShuttleJobCreateRequestV2026R0SettingsField.java @@ -0,0 +1,262 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobcreaterequestv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobCreateRequestV2026R0SettingsField extends SerializableObject { + + /** The maximum transfer bandwidth in bytes per second. `null` when unlimited. */ + @JsonProperty("bandwidth_limit_bytes_per_sec") + @Nullable + protected Long bandwidthLimitBytesPerSec; + + /** Whether deletions in the source system are mirrored in Box. */ + @JsonProperty("are_deletions_mirrored") + protected Boolean areDeletionsMirrored; + + /** Whether prior file versions are synced during the migration. */ + @JsonProperty("are_file_versions_synced") + protected Boolean areFileVersionsSynced; + + /** The maximum number of file versions to sync. `null` when unlimited. */ + @JsonProperty("max_file_versions") + @Nullable + protected Integer maxFileVersions; + + /** Whether existing files in Box are overwritten. */ + @JsonProperty("is_overwrite_enabled") + protected Boolean isOverwriteEnabled; + + /** Whether mappings that already completed successfully are skipped when the job is rerun. */ + @JsonProperty("are_completed_mappings_skipped_on_rerun") + protected Boolean areCompletedMappingsSkippedOnRerun; + + /** + * Whether migrated content is scanned during the migration. Applies only when the source system + * supports content scanning; ignored otherwise. + */ + @JsonProperty("is_content_scanning_enabled") + protected Boolean isContentScanningEnabled; + + /** + * Whether shared folders on the source are included in the migration. Applies only when the + * source system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_source_folders") + protected Boolean includeSharedSourceFolders; + + /** + * Whether shared folders on the destination are included in the migration. Applies only when the + * destination system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_destination_folders") + protected Boolean includeSharedDestinationFolders; + + public ShuttleJobCreateRequestV2026R0SettingsField() { + super(); + } + + protected ShuttleJobCreateRequestV2026R0SettingsField(Builder builder) { + super(); + this.bandwidthLimitBytesPerSec = builder.bandwidthLimitBytesPerSec; + this.areDeletionsMirrored = builder.areDeletionsMirrored; + this.areFileVersionsSynced = builder.areFileVersionsSynced; + this.maxFileVersions = builder.maxFileVersions; + this.isOverwriteEnabled = builder.isOverwriteEnabled; + this.areCompletedMappingsSkippedOnRerun = builder.areCompletedMappingsSkippedOnRerun; + this.isContentScanningEnabled = builder.isContentScanningEnabled; + this.includeSharedSourceFolders = builder.includeSharedSourceFolders; + this.includeSharedDestinationFolders = builder.includeSharedDestinationFolders; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Long getBandwidthLimitBytesPerSec() { + return bandwidthLimitBytesPerSec; + } + + public Boolean getAreDeletionsMirrored() { + return areDeletionsMirrored; + } + + public Boolean getAreFileVersionsSynced() { + return areFileVersionsSynced; + } + + public Integer getMaxFileVersions() { + return maxFileVersions; + } + + public Boolean getIsOverwriteEnabled() { + return isOverwriteEnabled; + } + + public Boolean getAreCompletedMappingsSkippedOnRerun() { + return areCompletedMappingsSkippedOnRerun; + } + + public Boolean getIsContentScanningEnabled() { + return isContentScanningEnabled; + } + + public Boolean getIncludeSharedSourceFolders() { + return includeSharedSourceFolders; + } + + public Boolean getIncludeSharedDestinationFolders() { + return includeSharedDestinationFolders; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobCreateRequestV2026R0SettingsField casted = + (ShuttleJobCreateRequestV2026R0SettingsField) o; + return Objects.equals(bandwidthLimitBytesPerSec, casted.bandwidthLimitBytesPerSec) + && Objects.equals(areDeletionsMirrored, casted.areDeletionsMirrored) + && Objects.equals(areFileVersionsSynced, casted.areFileVersionsSynced) + && Objects.equals(maxFileVersions, casted.maxFileVersions) + && Objects.equals(isOverwriteEnabled, casted.isOverwriteEnabled) + && Objects.equals( + areCompletedMappingsSkippedOnRerun, casted.areCompletedMappingsSkippedOnRerun) + && Objects.equals(isContentScanningEnabled, casted.isContentScanningEnabled) + && Objects.equals(includeSharedSourceFolders, casted.includeSharedSourceFolders) + && Objects.equals(includeSharedDestinationFolders, casted.includeSharedDestinationFolders); + } + + @Override + public int hashCode() { + return Objects.hash( + bandwidthLimitBytesPerSec, + areDeletionsMirrored, + areFileVersionsSynced, + maxFileVersions, + isOverwriteEnabled, + areCompletedMappingsSkippedOnRerun, + isContentScanningEnabled, + includeSharedSourceFolders, + includeSharedDestinationFolders); + } + + @Override + public String toString() { + return "ShuttleJobCreateRequestV2026R0SettingsField{" + + "bandwidthLimitBytesPerSec='" + + bandwidthLimitBytesPerSec + + '\'' + + ", " + + "areDeletionsMirrored='" + + areDeletionsMirrored + + '\'' + + ", " + + "areFileVersionsSynced='" + + areFileVersionsSynced + + '\'' + + ", " + + "maxFileVersions='" + + maxFileVersions + + '\'' + + ", " + + "isOverwriteEnabled='" + + isOverwriteEnabled + + '\'' + + ", " + + "areCompletedMappingsSkippedOnRerun='" + + areCompletedMappingsSkippedOnRerun + + '\'' + + ", " + + "isContentScanningEnabled='" + + isContentScanningEnabled + + '\'' + + ", " + + "includeSharedSourceFolders='" + + includeSharedSourceFolders + + '\'' + + ", " + + "includeSharedDestinationFolders='" + + includeSharedDestinationFolders + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Long bandwidthLimitBytesPerSec; + + protected Boolean areDeletionsMirrored; + + protected Boolean areFileVersionsSynced; + + protected Integer maxFileVersions; + + protected Boolean isOverwriteEnabled; + + protected Boolean areCompletedMappingsSkippedOnRerun; + + protected Boolean isContentScanningEnabled; + + protected Boolean includeSharedSourceFolders; + + protected Boolean includeSharedDestinationFolders; + + public Builder bandwidthLimitBytesPerSec(Long bandwidthLimitBytesPerSec) { + this.bandwidthLimitBytesPerSec = bandwidthLimitBytesPerSec; + this.markNullableFieldAsSet("bandwidth_limit_bytes_per_sec"); + return this; + } + + public Builder areDeletionsMirrored(Boolean areDeletionsMirrored) { + this.areDeletionsMirrored = areDeletionsMirrored; + return this; + } + + public Builder areFileVersionsSynced(Boolean areFileVersionsSynced) { + this.areFileVersionsSynced = areFileVersionsSynced; + return this; + } + + public Builder maxFileVersions(Integer maxFileVersions) { + this.maxFileVersions = maxFileVersions; + this.markNullableFieldAsSet("max_file_versions"); + return this; + } + + public Builder isOverwriteEnabled(Boolean isOverwriteEnabled) { + this.isOverwriteEnabled = isOverwriteEnabled; + return this; + } + + public Builder areCompletedMappingsSkippedOnRerun(Boolean areCompletedMappingsSkippedOnRerun) { + this.areCompletedMappingsSkippedOnRerun = areCompletedMappingsSkippedOnRerun; + return this; + } + + public Builder isContentScanningEnabled(Boolean isContentScanningEnabled) { + this.isContentScanningEnabled = isContentScanningEnabled; + return this; + } + + public Builder includeSharedSourceFolders(Boolean includeSharedSourceFolders) { + this.includeSharedSourceFolders = includeSharedSourceFolders; + return this; + } + + public Builder includeSharedDestinationFolders(Boolean includeSharedDestinationFolders) { + this.includeSharedDestinationFolders = includeSharedDestinationFolders; + return this; + } + + public ShuttleJobCreateRequestV2026R0SettingsField build() { + return new ShuttleJobCreateRequestV2026R0SettingsField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobpermissionconflictstrategyv2026r0/ShuttleJobPermissionConflictStrategyV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobpermissionconflictstrategyv2026r0/ShuttleJobPermissionConflictStrategyV2026R0.java new file mode 100644 index 000000000..efaa386c6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobpermissionconflictstrategyv2026r0/ShuttleJobPermissionConflictStrategyV2026R0.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobpermissionconflictstrategyv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobPermissionConflictStrategyV2026R0 implements Valuable { + PRESERVE_STRUCTURE_RESTRICT_SHARING("preserve_structure_restrict_sharing"), + PRESERVE_STRUCTURE_EXPAND_SHARING("preserve_structure_expand_sharing"), + PRESERVE_SHARING_MODIFY_STRUCTURE("preserve_sharing_modify_structure"), + WARN_PERMISSIONS_CONFLICTS("warn_permissions_conflicts"); + + private final String value; + + ShuttleJobPermissionConflictStrategyV2026R0(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobPermissionConflictStrategyV2026R0Deserializer + extends JsonDeserializer> { + + public ShuttleJobPermissionConflictStrategyV2026R0Deserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobPermissionConflictStrategyV2026R0.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobPermissionConflictStrategyV2026R0Serializer + extends JsonSerializer> { + + public ShuttleJobPermissionConflictStrategyV2026R0Serializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0.java new file mode 100644 index 000000000..565f7d4a5 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0.java @@ -0,0 +1,281 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulecreaterequestv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0.ShuttleJobScheduleTriggerByJobV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0.ShuttleJobScheduleTriggerByTimeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerv2026r0.ShuttleJobScheduleTriggerV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** The request body used to create a shuttle job schedule. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobScheduleCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle job this schedule belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** The kind of run the schedule starts. `scan` is not a valid schedule run mode. */ + @JsonDeserialize( + using = + ShuttleJobScheduleCreateRequestV2026R0RunModeField + .ShuttleJobScheduleCreateRequestV2026R0RunModeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleCreateRequestV2026R0RunModeField + .ShuttleJobScheduleCreateRequestV2026R0RunModeFieldSerializer.class) + @JsonProperty("run_mode") + protected final EnumWrapper runMode; + + /** Whether the schedule is active. When omitted, defaults to `enabled`. */ + @JsonDeserialize( + using = + ShuttleJobScheduleCreateRequestV2026R0StateField + .ShuttleJobScheduleCreateRequestV2026R0StateFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleCreateRequestV2026R0StateField + .ShuttleJobScheduleCreateRequestV2026R0StateFieldSerializer.class) + protected EnumWrapper state; + + /** An optional human-readable description of the schedule. */ + @Nullable protected String description; + + protected final ShuttleJobScheduleTriggerV2026R0 trigger; + + public ShuttleJobScheduleCreateRequestV2026R0( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public ShuttleJobScheduleCreateRequestV2026R0( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public ShuttleJobScheduleCreateRequestV2026R0( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + } + + public ShuttleJobScheduleCreateRequestV2026R0( + String jobId, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public ShuttleJobScheduleCreateRequestV2026R0( + String jobId, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public ShuttleJobScheduleCreateRequestV2026R0( + @JsonProperty("job_id") String jobId, + @JsonProperty("run_mode") + EnumWrapper runMode, + @JsonProperty("trigger") ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = trigger; + } + + protected ShuttleJobScheduleCreateRequestV2026R0(Builder builder) { + super(); + this.jobId = builder.jobId; + this.runMode = builder.runMode; + this.state = builder.state; + this.description = builder.description; + this.trigger = builder.trigger; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getJobId() { + return jobId; + } + + public EnumWrapper getRunMode() { + return runMode; + } + + public EnumWrapper getState() { + return state; + } + + public String getDescription() { + return description; + } + + public ShuttleJobScheduleTriggerV2026R0 getTrigger() { + return trigger; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobScheduleCreateRequestV2026R0 casted = (ShuttleJobScheduleCreateRequestV2026R0) o; + return Objects.equals(jobId, casted.jobId) + && Objects.equals(runMode, casted.runMode) + && Objects.equals(state, casted.state) + && Objects.equals(description, casted.description) + && Objects.equals(trigger, casted.trigger); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, runMode, state, description, trigger); + } + + @Override + public String toString() { + return "ShuttleJobScheduleCreateRequestV2026R0{" + + "jobId='" + + jobId + + '\'' + + ", " + + "runMode='" + + runMode + + '\'' + + ", " + + "state='" + + state + + '\'' + + ", " + + "description='" + + description + + '\'' + + ", " + + "trigger='" + + trigger + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String jobId; + + protected final EnumWrapper runMode; + + protected EnumWrapper state; + + protected String description; + + protected final ShuttleJobScheduleTriggerV2026R0 trigger; + + public Builder( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String jobId, + ShuttleJobScheduleCreateRequestV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + } + + public Builder( + String jobId, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String jobId, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String jobId, + EnumWrapper runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.jobId = jobId; + this.runMode = runMode; + this.trigger = trigger; + } + + public Builder state(ShuttleJobScheduleCreateRequestV2026R0StateField state) { + this.state = new EnumWrapper(state); + return this; + } + + public Builder state(EnumWrapper state) { + this.state = state; + return this; + } + + public Builder description(String description) { + this.description = description; + this.markNullableFieldAsSet("description"); + return this; + } + + public ShuttleJobScheduleCreateRequestV2026R0 build() { + return new ShuttleJobScheduleCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0RunModeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0RunModeField.java new file mode 100644 index 000000000..9addab56d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0RunModeField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulecreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleCreateRequestV2026R0RunModeField implements Valuable { + TRANSFER("transfer"), + SIMULATION("simulation"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobScheduleCreateRequestV2026R0RunModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleCreateRequestV2026R0RunModeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleCreateRequestV2026R0RunModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleCreateRequestV2026R0RunModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleCreateRequestV2026R0RunModeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleCreateRequestV2026R0RunModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0StateField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0StateField.java new file mode 100644 index 000000000..9f38b10de --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulecreaterequestv2026r0/ShuttleJobScheduleCreateRequestV2026R0StateField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulecreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleCreateRequestV2026R0StateField implements Valuable { + ENABLED("enabled"), + PAUSED("paused"); + + private final String value; + + ShuttleJobScheduleCreateRequestV2026R0StateField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleCreateRequestV2026R0StateFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleCreateRequestV2026R0StateFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleCreateRequestV2026R0StateField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleCreateRequestV2026R0StateFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleCreateRequestV2026R0StateFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulesv2026r0/ShuttleJobSchedulesV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulesv2026r0/ShuttleJobSchedulesV2026R0.java new file mode 100644 index 000000000..b8c0725ae --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulesv2026r0/ShuttleJobSchedulesV2026R0.java @@ -0,0 +1,143 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulesv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0.ShuttleJobScheduleV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle job schedules. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobSchedulesV2026R0 extends SerializableObject { + + /** A list of shuttle job schedules. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleJobSchedulesV2026R0( + @JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleJobSchedulesV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobSchedulesV2026R0 casted = (ShuttleJobSchedulesV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleJobSchedulesV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleJobSchedulesV2026R0 build() { + return new ShuttleJobSchedulesV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0.java new file mode 100644 index 000000000..9fac01fb0 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0.java @@ -0,0 +1,175 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A job-based trigger that starts this schedule after another shuttle job's run meets a condition. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobScheduleTriggerByJobV2026R0 extends SerializableObject { + + /** The value will always be `by_job`. */ + @JsonDeserialize( + using = + ShuttleJobScheduleTriggerByJobV2026R0TypeField + .ShuttleJobScheduleTriggerByJobV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleTriggerByJobV2026R0TypeField + .ShuttleJobScheduleTriggerByJobV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job whose run starts this schedule. */ + @JsonProperty("triggered_by_job_id") + protected final String triggeredByJobId; + + /** When this schedule should start a run relative to the last run of the triggering job. */ + @JsonDeserialize( + using = + ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField + .ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField + .ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldSerializer.class) + @JsonProperty("last_run_condition") + protected final EnumWrapper + lastRunCondition; + + public ShuttleJobScheduleTriggerByJobV2026R0( + String triggeredByJobId, + ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField lastRunCondition) { + super(); + this.triggeredByJobId = triggeredByJobId; + this.lastRunCondition = + new EnumWrapper( + lastRunCondition); + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByJobV2026R0TypeField.BY_JOB); + } + + public ShuttleJobScheduleTriggerByJobV2026R0( + @JsonProperty("triggered_by_job_id") String triggeredByJobId, + @JsonProperty("last_run_condition") + EnumWrapper + lastRunCondition) { + super(); + this.triggeredByJobId = triggeredByJobId; + this.lastRunCondition = lastRunCondition; + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByJobV2026R0TypeField.BY_JOB); + } + + protected ShuttleJobScheduleTriggerByJobV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.triggeredByJobId = builder.triggeredByJobId; + this.lastRunCondition = builder.lastRunCondition; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getTriggeredByJobId() { + return triggeredByJobId; + } + + public EnumWrapper + getLastRunCondition() { + return lastRunCondition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobScheduleTriggerByJobV2026R0 casted = (ShuttleJobScheduleTriggerByJobV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(triggeredByJobId, casted.triggeredByJobId) + && Objects.equals(lastRunCondition, casted.lastRunCondition); + } + + @Override + public int hashCode() { + return Objects.hash(type, triggeredByJobId, lastRunCondition); + } + + @Override + public String toString() { + return "ShuttleJobScheduleTriggerByJobV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "triggeredByJobId='" + + triggeredByJobId + + '\'' + + ", " + + "lastRunCondition='" + + lastRunCondition + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String triggeredByJobId; + + protected final EnumWrapper + lastRunCondition; + + public Builder( + String triggeredByJobId, + ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField lastRunCondition) { + super(); + this.triggeredByJobId = triggeredByJobId; + this.lastRunCondition = + new EnumWrapper( + lastRunCondition); + } + + public Builder( + String triggeredByJobId, + EnumWrapper lastRunCondition) { + super(); + this.triggeredByJobId = triggeredByJobId; + this.lastRunCondition = lastRunCondition; + } + + public Builder type(ShuttleJobScheduleTriggerByJobV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public ShuttleJobScheduleTriggerByJobV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByJobV2026R0TypeField.BY_JOB); + } + return new ShuttleJobScheduleTriggerByJobV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField.java new file mode 100644 index 000000000..2043607e2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField.java @@ -0,0 +1,69 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField implements Valuable { + ALWAYS("always"), + ON_SUCCESS("on_success"), + ON_FINISH("on_finish"); + + private final String value; + + ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0TypeField.java new file mode 100644 index 000000000..1a84d7d83 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbyjobv2026r0/ShuttleJobScheduleTriggerByJobV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleTriggerByJobV2026R0TypeField implements Valuable { + BY_JOB("by_job"); + + private final String value; + + ShuttleJobScheduleTriggerByJobV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleTriggerByJobV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleTriggerByJobV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleTriggerByJobV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleTriggerByJobV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleTriggerByJobV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0.java new file mode 100644 index 000000000..b178d04a1 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0.java @@ -0,0 +1,190 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A time-based trigger that starts the schedule at a wall-clock time and optionally repeats. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobScheduleTriggerByTimeV2026R0 extends SerializableObject { + + /** The value will always be `by_time`. */ + @JsonDeserialize( + using = + ShuttleJobScheduleTriggerByTimeV2026R0TypeField + .ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleTriggerByTimeV2026R0TypeField + .ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** + * The local wall-clock time when the schedule should first start a run, without an offset or `Z` + * suffix. Combined with `time_zone` to determine the instant, including DST. + */ + @JsonProperty("start_at") + protected final String startAt; + + /** + * The IANA time zone that gives `start_at` its calendar meaning (for example + * `America/Los_Angeles`). Recurrence and DST transitions are evaluated in this zone. + */ + @JsonProperty("time_zone") + protected final String timeZone; + + /** How often the schedule repeats after `start_at`. */ + @JsonDeserialize( + using = + ShuttleJobScheduleTriggerByTimeV2026R0RepeatField + .ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleTriggerByTimeV2026R0RepeatField + .ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldSerializer.class) + protected final EnumWrapper repeat; + + public ShuttleJobScheduleTriggerByTimeV2026R0( + String startAt, String timeZone, ShuttleJobScheduleTriggerByTimeV2026R0RepeatField repeat) { + super(); + this.startAt = startAt; + this.timeZone = timeZone; + this.repeat = new EnumWrapper(repeat); + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByTimeV2026R0TypeField.BY_TIME); + } + + public ShuttleJobScheduleTriggerByTimeV2026R0( + @JsonProperty("start_at") String startAt, + @JsonProperty("time_zone") String timeZone, + @JsonProperty("repeat") + EnumWrapper repeat) { + super(); + this.startAt = startAt; + this.timeZone = timeZone; + this.repeat = repeat; + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByTimeV2026R0TypeField.BY_TIME); + } + + protected ShuttleJobScheduleTriggerByTimeV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.startAt = builder.startAt; + this.timeZone = builder.timeZone; + this.repeat = builder.repeat; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getStartAt() { + return startAt; + } + + public String getTimeZone() { + return timeZone; + } + + public EnumWrapper getRepeat() { + return repeat; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobScheduleTriggerByTimeV2026R0 casted = (ShuttleJobScheduleTriggerByTimeV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(startAt, casted.startAt) + && Objects.equals(timeZone, casted.timeZone) + && Objects.equals(repeat, casted.repeat); + } + + @Override + public int hashCode() { + return Objects.hash(type, startAt, timeZone, repeat); + } + + @Override + public String toString() { + return "ShuttleJobScheduleTriggerByTimeV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "startAt='" + + startAt + + '\'' + + ", " + + "timeZone='" + + timeZone + + '\'' + + ", " + + "repeat='" + + repeat + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String startAt; + + protected final String timeZone; + + protected final EnumWrapper repeat; + + public Builder( + String startAt, String timeZone, ShuttleJobScheduleTriggerByTimeV2026R0RepeatField repeat) { + super(); + this.startAt = startAt; + this.timeZone = timeZone; + this.repeat = new EnumWrapper(repeat); + } + + public Builder( + String startAt, + String timeZone, + EnumWrapper repeat) { + super(); + this.startAt = startAt; + this.timeZone = timeZone; + this.repeat = repeat; + } + + public Builder type(ShuttleJobScheduleTriggerByTimeV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public ShuttleJobScheduleTriggerByTimeV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleJobScheduleTriggerByTimeV2026R0TypeField.BY_TIME); + } + return new ShuttleJobScheduleTriggerByTimeV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0RepeatField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0RepeatField.java new file mode 100644 index 000000000..2fa4393bd --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0RepeatField.java @@ -0,0 +1,68 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleTriggerByTimeV2026R0RepeatField implements Valuable { + NONE("none"), + DAILY("daily"), + WEEKLY("weekly"), + WEEKDAYS("weekdays"), + WEEKENDS("weekends"); + + private final String value; + + ShuttleJobScheduleTriggerByTimeV2026R0RepeatField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleTriggerByTimeV2026R0RepeatField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleTriggerByTimeV2026R0RepeatFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0TypeField.java new file mode 100644 index 000000000..df9c61139 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerbytimev2026r0/ShuttleJobScheduleTriggerByTimeV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleTriggerByTimeV2026R0TypeField implements Valuable { + BY_TIME("by_time"); + + private final String value; + + ShuttleJobScheduleTriggerByTimeV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleTriggerByTimeV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleTriggerByTimeV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerv2026r0/ShuttleJobScheduleTriggerV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerv2026r0/ShuttleJobScheduleTriggerV2026R0.java new file mode 100644 index 000000000..dab00fa20 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduletriggerv2026r0/ShuttleJobScheduleTriggerV2026R0.java @@ -0,0 +1,83 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerv2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0.ShuttleJobScheduleTriggerByJobV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0.ShuttleJobScheduleTriggerByTimeV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = ShuttleJobScheduleTriggerV2026R0.ShuttleJobScheduleTriggerV2026R0Deserializer.class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class ShuttleJobScheduleTriggerV2026R0 + extends OneOfTwo< + ShuttleJobScheduleTriggerByTimeV2026R0, ShuttleJobScheduleTriggerByJobV2026R0> { + + protected final String type; + + public ShuttleJobScheduleTriggerV2026R0( + ShuttleJobScheduleTriggerByTimeV2026R0 shuttleJobScheduleTriggerByTimeV2026R0) { + super(shuttleJobScheduleTriggerByTimeV2026R0, null); + this.type = EnumWrapper.convertToString(shuttleJobScheduleTriggerByTimeV2026R0.getType()); + } + + public ShuttleJobScheduleTriggerV2026R0( + ShuttleJobScheduleTriggerByJobV2026R0 shuttleJobScheduleTriggerByJobV2026R0) { + super(null, shuttleJobScheduleTriggerByJobV2026R0); + this.type = EnumWrapper.convertToString(shuttleJobScheduleTriggerByJobV2026R0.getType()); + } + + public boolean isShuttleJobScheduleTriggerByTimeV2026R0() { + return value0 != null; + } + + public ShuttleJobScheduleTriggerByTimeV2026R0 getShuttleJobScheduleTriggerByTimeV2026R0() { + return value0; + } + + public boolean isShuttleJobScheduleTriggerByJobV2026R0() { + return value1 != null; + } + + public ShuttleJobScheduleTriggerByJobV2026R0 getShuttleJobScheduleTriggerByJobV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + static class ShuttleJobScheduleTriggerV2026R0Deserializer + extends JsonDeserializer { + + public ShuttleJobScheduleTriggerV2026R0Deserializer() { + super(); + } + + @Override + public ShuttleJobScheduleTriggerV2026R0 deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "by_time": + return new ShuttleJobScheduleTriggerV2026R0( + JsonManager.deserialize(node, ShuttleJobScheduleTriggerByTimeV2026R0.class)); + case "by_job": + return new ShuttleJobScheduleTriggerV2026R0( + JsonManager.deserialize(node, ShuttleJobScheduleTriggerByJobV2026R0.class)); + } + } + throw new JsonMappingException(jp, "Unable to deserialize ShuttleJobScheduleTriggerV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0.java new file mode 100644 index 000000000..95357ce99 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0.java @@ -0,0 +1,177 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduleupdaterequestv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0.ShuttleJobScheduleTriggerByJobV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0.ShuttleJobScheduleTriggerByTimeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerv2026r0.ShuttleJobScheduleTriggerV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * The request body used to update an existing shuttle job schedule. Only the fields supplied in the + * request body are changed. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobScheduleUpdateRequestV2026R0 extends SerializableObject { + + /** Whether the schedule is active. */ + @JsonDeserialize( + using = + ShuttleJobScheduleUpdateRequestV2026R0StateField + .ShuttleJobScheduleUpdateRequestV2026R0StateFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleUpdateRequestV2026R0StateField + .ShuttleJobScheduleUpdateRequestV2026R0StateFieldSerializer.class) + protected EnumWrapper state; + + /** The kind of run the schedule starts. `scan` is not a valid schedule run mode. */ + @JsonDeserialize( + using = + ShuttleJobScheduleUpdateRequestV2026R0RunModeField + .ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleUpdateRequestV2026R0RunModeField + .ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldSerializer.class) + @JsonProperty("run_mode") + protected EnumWrapper runMode; + + /** An optional human-readable description of the schedule. */ + @Nullable protected String description; + + protected ShuttleJobScheduleTriggerV2026R0 trigger; + + public ShuttleJobScheduleUpdateRequestV2026R0() { + super(); + } + + protected ShuttleJobScheduleUpdateRequestV2026R0(Builder builder) { + super(); + this.state = builder.state; + this.runMode = builder.runMode; + this.description = builder.description; + this.trigger = builder.trigger; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getState() { + return state; + } + + public EnumWrapper getRunMode() { + return runMode; + } + + public String getDescription() { + return description; + } + + public ShuttleJobScheduleTriggerV2026R0 getTrigger() { + return trigger; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobScheduleUpdateRequestV2026R0 casted = (ShuttleJobScheduleUpdateRequestV2026R0) o; + return Objects.equals(state, casted.state) + && Objects.equals(runMode, casted.runMode) + && Objects.equals(description, casted.description) + && Objects.equals(trigger, casted.trigger); + } + + @Override + public int hashCode() { + return Objects.hash(state, runMode, description, trigger); + } + + @Override + public String toString() { + return "ShuttleJobScheduleUpdateRequestV2026R0{" + + "state='" + + state + + '\'' + + ", " + + "runMode='" + + runMode + + '\'' + + ", " + + "description='" + + description + + '\'' + + ", " + + "trigger='" + + trigger + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper state; + + protected EnumWrapper runMode; + + protected String description; + + protected ShuttleJobScheduleTriggerV2026R0 trigger; + + public Builder state(ShuttleJobScheduleUpdateRequestV2026R0StateField state) { + this.state = new EnumWrapper(state); + return this; + } + + public Builder state(EnumWrapper state) { + this.state = state; + return this; + } + + public Builder runMode(ShuttleJobScheduleUpdateRequestV2026R0RunModeField runMode) { + this.runMode = new EnumWrapper(runMode); + return this; + } + + public Builder runMode( + EnumWrapper runMode) { + this.runMode = runMode; + return this; + } + + public Builder description(String description) { + this.description = description; + this.markNullableFieldAsSet("description"); + return this; + } + + public Builder trigger(ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + return this; + } + + public Builder trigger(ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + return this; + } + + public Builder trigger(ShuttleJobScheduleTriggerV2026R0 trigger) { + this.trigger = trigger; + return this; + } + + public ShuttleJobScheduleUpdateRequestV2026R0 build() { + return new ShuttleJobScheduleUpdateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0RunModeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0RunModeField.java new file mode 100644 index 000000000..0e463ec93 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0RunModeField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduleupdaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleUpdateRequestV2026R0RunModeField implements Valuable { + TRANSFER("transfer"), + SIMULATION("simulation"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobScheduleUpdateRequestV2026R0RunModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleUpdateRequestV2026R0RunModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleUpdateRequestV2026R0RunModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0StateField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0StateField.java new file mode 100644 index 000000000..19d5b427b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobscheduleupdaterequestv2026r0/ShuttleJobScheduleUpdateRequestV2026R0StateField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobscheduleupdaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleUpdateRequestV2026R0StateField implements Valuable { + ENABLED("enabled"), + PAUSED("paused"); + + private final String value; + + ShuttleJobScheduleUpdateRequestV2026R0StateField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleUpdateRequestV2026R0StateFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleUpdateRequestV2026R0StateFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleUpdateRequestV2026R0StateField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleUpdateRequestV2026R0StateFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleUpdateRequestV2026R0StateFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0.java new file mode 100644 index 000000000..1e0706334 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0.java @@ -0,0 +1,603 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbyjobv2026r0.ShuttleJobScheduleTriggerByJobV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerbytimev2026r0.ShuttleJobScheduleTriggerByTimeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlejobscheduletriggerv2026r0.ShuttleJobScheduleTriggerV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * A schedule that starts runs of a shuttle job. A schedule is either time-based or triggered by + * another job's run. Schedules cannot start a run in `scan` mode. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobScheduleV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle job schedule. */ + protected final String id; + + /** The value will always be `shuttle_job_schedule`. */ + @JsonDeserialize( + using = + ShuttleJobScheduleV2026R0TypeField.ShuttleJobScheduleV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttleJobScheduleV2026R0TypeField.ShuttleJobScheduleV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this schedule belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** Whether the schedule is active. */ + @JsonDeserialize( + using = + ShuttleJobScheduleV2026R0StateField.ShuttleJobScheduleV2026R0StateFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleJobScheduleV2026R0StateField.ShuttleJobScheduleV2026R0StateFieldSerializer.class) + protected final EnumWrapper state; + + /** The kind of run the schedule starts. `scan` is not a valid schedule run mode. */ + @JsonDeserialize( + using = + ShuttleJobScheduleV2026R0RunModeField.ShuttleJobScheduleV2026R0RunModeFieldDeserializer + .class) + @JsonSerialize( + using = + ShuttleJobScheduleV2026R0RunModeField.ShuttleJobScheduleV2026R0RunModeFieldSerializer + .class) + @JsonProperty("run_mode") + protected final EnumWrapper runMode; + + /** An optional human-readable description of the schedule. */ + @Nullable protected String description; + + /** + * When the schedule last attempted to start a run. `null` when the schedule has never started a + * run. + */ + @JsonProperty("last_attempt_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + @Nullable + protected OffsetDateTime lastAttemptAt; + + protected final ShuttleJobScheduleTriggerV2026R0 trigger; + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = trigger; + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + EnumWrapper state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + String id, + String jobId, + EnumWrapper state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + public ShuttleJobScheduleV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("state") EnumWrapper state, + @JsonProperty("run_mode") EnumWrapper runMode, + @JsonProperty("trigger") ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = trigger; + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + + protected ShuttleJobScheduleV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.state = builder.state; + this.runMode = builder.runMode; + this.description = builder.description; + this.lastAttemptAt = builder.lastAttemptAt; + this.trigger = builder.trigger; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public EnumWrapper getState() { + return state; + } + + public EnumWrapper getRunMode() { + return runMode; + } + + public String getDescription() { + return description; + } + + public OffsetDateTime getLastAttemptAt() { + return lastAttemptAt; + } + + public ShuttleJobScheduleTriggerV2026R0 getTrigger() { + return trigger; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobScheduleV2026R0 casted = (ShuttleJobScheduleV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(state, casted.state) + && Objects.equals(runMode, casted.runMode) + && Objects.equals(description, casted.description) + && Objects.equals(lastAttemptAt, casted.lastAttemptAt) + && Objects.equals(trigger, casted.trigger); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, jobId, state, runMode, description, lastAttemptAt, trigger); + } + + @Override + public String toString() { + return "ShuttleJobScheduleV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "state='" + + state + + '\'' + + ", " + + "runMode='" + + runMode + + '\'' + + ", " + + "description='" + + description + + '\'' + + ", " + + "lastAttemptAt='" + + lastAttemptAt + + '\'' + + ", " + + "trigger='" + + trigger + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected final EnumWrapper state; + + protected final EnumWrapper runMode; + + protected String description; + + protected OffsetDateTime lastAttemptAt; + + protected final ShuttleJobScheduleTriggerV2026R0 trigger; + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + } + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + ShuttleJobScheduleV2026R0StateField state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = new EnumWrapper(state); + this.runMode = runMode; + this.trigger = trigger; + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + ShuttleJobScheduleV2026R0RunModeField runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = new EnumWrapper(runMode); + this.trigger = trigger; + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByTimeV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerByJobV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = new ShuttleJobScheduleTriggerV2026R0(trigger); + } + + public Builder( + String id, + String jobId, + EnumWrapper state, + EnumWrapper runMode, + ShuttleJobScheduleTriggerV2026R0 trigger) { + super(); + this.id = id; + this.jobId = jobId; + this.state = state; + this.runMode = runMode; + this.trigger = trigger; + } + + public Builder type(ShuttleJobScheduleV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder description(String description) { + this.description = description; + this.markNullableFieldAsSet("description"); + return this; + } + + public Builder lastAttemptAt(OffsetDateTime lastAttemptAt) { + this.lastAttemptAt = lastAttemptAt; + this.markNullableFieldAsSet("last_attempt_at"); + return this; + } + + public ShuttleJobScheduleV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE); + } + return new ShuttleJobScheduleV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0RunModeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0RunModeField.java new file mode 100644 index 000000000..36d6f2351 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0RunModeField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleV2026R0RunModeField implements Valuable { + TRANSFER("transfer"), + SIMULATION("simulation"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobScheduleV2026R0RunModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleV2026R0RunModeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleV2026R0RunModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleV2026R0RunModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleV2026R0RunModeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleV2026R0RunModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0StateField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0StateField.java new file mode 100644 index 000000000..9d355b062 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0StateField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleV2026R0StateField implements Valuable { + ENABLED("enabled"), + PAUSED("paused"); + + private final String value; + + ShuttleJobScheduleV2026R0StateField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleV2026R0StateFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleV2026R0StateFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleV2026R0StateField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleV2026R0StateFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleV2026R0StateFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0TypeField.java new file mode 100644 index 000000000..2c92e91fe --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobschedulev2026r0/ShuttleJobScheduleV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobschedulev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobScheduleV2026R0TypeField implements Valuable { + SHUTTLE_JOB_SCHEDULE("shuttle_job_schedule"); + + private final String value; + + ShuttleJobScheduleV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobScheduleV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobScheduleV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobScheduleV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobScheduleV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobScheduleV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0.java new file mode 100644 index 000000000..f2be8deea --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0.java @@ -0,0 +1,80 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobstartrequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** The request body used to start a shuttle job. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobStartRequestV2026R0 extends SerializableObject { + + /** The run mode. Defaults to simulation when omitted. */ + @JsonDeserialize( + using = + ShuttleJobStartRequestV2026R0ModeField.ShuttleJobStartRequestV2026R0ModeFieldDeserializer + .class) + @JsonSerialize( + using = + ShuttleJobStartRequestV2026R0ModeField.ShuttleJobStartRequestV2026R0ModeFieldSerializer + .class) + protected EnumWrapper mode; + + public ShuttleJobStartRequestV2026R0() { + super(); + } + + protected ShuttleJobStartRequestV2026R0(Builder builder) { + super(); + this.mode = builder.mode; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getMode() { + return mode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobStartRequestV2026R0 casted = (ShuttleJobStartRequestV2026R0) o; + return Objects.equals(mode, casted.mode); + } + + @Override + public int hashCode() { + return Objects.hash(mode); + } + + @Override + public String toString() { + return "ShuttleJobStartRequestV2026R0{" + "mode='" + mode + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper mode; + + public Builder mode(ShuttleJobStartRequestV2026R0ModeField mode) { + this.mode = new EnumWrapper(mode); + return this; + } + + public Builder mode(EnumWrapper mode) { + this.mode = mode; + return this; + } + + public ShuttleJobStartRequestV2026R0 build() { + return new ShuttleJobStartRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0ModeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0ModeField.java new file mode 100644 index 000000000..e48dbbb91 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobstartrequestv2026r0/ShuttleJobStartRequestV2026R0ModeField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobstartrequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobStartRequestV2026R0ModeField implements Valuable { + TRANSFER("transfer"), + SIMULATION("simulation"), + SCAN("scan"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobStartRequestV2026R0ModeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobStartRequestV2026R0ModeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobStartRequestV2026R0ModeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobStartRequestV2026R0ModeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobStartRequestV2026R0ModeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobStartRequestV2026R0ModeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobsv2026r0/ShuttleJobsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobsv2026r0/ShuttleJobsV2026R0.java new file mode 100644 index 000000000..9cbf4e32e --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobsv2026r0/ShuttleJobsV2026R0.java @@ -0,0 +1,142 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0.ShuttleJobV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle jobs. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobsV2026R0 extends SerializableObject { + + /** A list of shuttle jobs. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleJobsV2026R0(@JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleJobsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobsV2026R0 casted = (ShuttleJobsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleJobsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleJobsV2026R0 build() { + return new ShuttleJobsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0.java new file mode 100644 index 000000000..7e0d5a487 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0.java @@ -0,0 +1,160 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobupdaterequestv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** + * The request body used to update an existing shuttle job. Only the fields supplied in the request + * body are changed. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobUpdateRequestV2026R0 extends SerializableObject { + + /** The human-readable name of the shuttle job. */ + protected String name; + + /** An optional free-form comment describing the shuttle job. */ + @Nullable protected String comment; + + /** A list of free-form tags associated with the shuttle job. */ + protected List tags; + + /** + * The account mapping configuration that controls how source identities and permissions are + * translated into Box. + */ + @JsonProperty("account_mapping") + protected ShuttleJobUpdateRequestV2026R0AccountMappingField accountMapping; + + /** The tunable settings that control how the shuttle job runs. */ + protected ShuttleJobUpdateRequestV2026R0SettingsField settings; + + public ShuttleJobUpdateRequestV2026R0() { + super(); + } + + protected ShuttleJobUpdateRequestV2026R0(Builder builder) { + super(); + this.name = builder.name; + this.comment = builder.comment; + this.tags = builder.tags; + this.accountMapping = builder.accountMapping; + this.settings = builder.settings; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getName() { + return name; + } + + public String getComment() { + return comment; + } + + public List getTags() { + return tags; + } + + public ShuttleJobUpdateRequestV2026R0AccountMappingField getAccountMapping() { + return accountMapping; + } + + public ShuttleJobUpdateRequestV2026R0SettingsField getSettings() { + return settings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobUpdateRequestV2026R0 casted = (ShuttleJobUpdateRequestV2026R0) o; + return Objects.equals(name, casted.name) + && Objects.equals(comment, casted.comment) + && Objects.equals(tags, casted.tags) + && Objects.equals(accountMapping, casted.accountMapping) + && Objects.equals(settings, casted.settings); + } + + @Override + public int hashCode() { + return Objects.hash(name, comment, tags, accountMapping, settings); + } + + @Override + public String toString() { + return "ShuttleJobUpdateRequestV2026R0{" + + "name='" + + name + + '\'' + + ", " + + "comment='" + + comment + + '\'' + + ", " + + "tags='" + + tags + + '\'' + + ", " + + "accountMapping='" + + accountMapping + + '\'' + + ", " + + "settings='" + + settings + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected String name; + + protected String comment; + + protected List tags; + + protected ShuttleJobUpdateRequestV2026R0AccountMappingField accountMapping; + + protected ShuttleJobUpdateRequestV2026R0SettingsField settings; + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder comment(String comment) { + this.comment = comment; + this.markNullableFieldAsSet("comment"); + return this; + } + + public Builder tags(List tags) { + this.tags = tags; + return this; + } + + public Builder accountMapping( + ShuttleJobUpdateRequestV2026R0AccountMappingField accountMapping) { + this.accountMapping = accountMapping; + return this; + } + + public Builder settings(ShuttleJobUpdateRequestV2026R0SettingsField settings) { + this.settings = settings; + return this; + } + + public ShuttleJobUpdateRequestV2026R0 build() { + return new ShuttleJobUpdateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0AccountMappingField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0AccountMappingField.java new file mode 100644 index 000000000..1c0f057a8 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0AccountMappingField.java @@ -0,0 +1,154 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobupdaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobpermissionconflictstrategyv2026r0.ShuttleJobPermissionConflictStrategyV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobUpdateRequestV2026R0AccountMappingField extends SerializableObject { + + /** Whether account mapping is enabled for the shuttle job. */ + @JsonProperty("is_enabled") + protected Boolean isEnabled; + + /** The strategy used to resolve permission conflicts. `null` when unset. */ + @JsonDeserialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Deserializer.class) + @JsonSerialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Serializer.class) + @JsonProperty("permission_conflict_strategy") + protected EnumWrapper permissionConflictStrategy; + + /** Whether external shares are mapped during the migration. */ + @JsonProperty("are_external_shares_mapped") + protected Boolean areExternalSharesMapped; + + /** Whether permissions are mapped during the migration. */ + @JsonProperty("are_permissions_mapped") + protected Boolean arePermissionsMapped; + + public ShuttleJobUpdateRequestV2026R0AccountMappingField() { + super(); + } + + protected ShuttleJobUpdateRequestV2026R0AccountMappingField(Builder builder) { + super(); + this.isEnabled = builder.isEnabled; + this.permissionConflictStrategy = builder.permissionConflictStrategy; + this.areExternalSharesMapped = builder.areExternalSharesMapped; + this.arePermissionsMapped = builder.arePermissionsMapped; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Boolean getIsEnabled() { + return isEnabled; + } + + public EnumWrapper getPermissionConflictStrategy() { + return permissionConflictStrategy; + } + + public Boolean getAreExternalSharesMapped() { + return areExternalSharesMapped; + } + + public Boolean getArePermissionsMapped() { + return arePermissionsMapped; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobUpdateRequestV2026R0AccountMappingField casted = + (ShuttleJobUpdateRequestV2026R0AccountMappingField) o; + return Objects.equals(isEnabled, casted.isEnabled) + && Objects.equals(permissionConflictStrategy, casted.permissionConflictStrategy) + && Objects.equals(areExternalSharesMapped, casted.areExternalSharesMapped) + && Objects.equals(arePermissionsMapped, casted.arePermissionsMapped); + } + + @Override + public int hashCode() { + return Objects.hash( + isEnabled, permissionConflictStrategy, areExternalSharesMapped, arePermissionsMapped); + } + + @Override + public String toString() { + return "ShuttleJobUpdateRequestV2026R0AccountMappingField{" + + "isEnabled='" + + isEnabled + + '\'' + + ", " + + "permissionConflictStrategy='" + + permissionConflictStrategy + + '\'' + + ", " + + "areExternalSharesMapped='" + + areExternalSharesMapped + + '\'' + + ", " + + "arePermissionsMapped='" + + arePermissionsMapped + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Boolean isEnabled; + + protected EnumWrapper permissionConflictStrategy; + + protected Boolean areExternalSharesMapped; + + protected Boolean arePermissionsMapped; + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + public Builder permissionConflictStrategy( + ShuttleJobPermissionConflictStrategyV2026R0 permissionConflictStrategy) { + this.permissionConflictStrategy = + new EnumWrapper(permissionConflictStrategy); + return this; + } + + public Builder permissionConflictStrategy( + EnumWrapper permissionConflictStrategy) { + this.permissionConflictStrategy = permissionConflictStrategy; + return this; + } + + public Builder areExternalSharesMapped(Boolean areExternalSharesMapped) { + this.areExternalSharesMapped = areExternalSharesMapped; + return this; + } + + public Builder arePermissionsMapped(Boolean arePermissionsMapped) { + this.arePermissionsMapped = arePermissionsMapped; + return this; + } + + public ShuttleJobUpdateRequestV2026R0AccountMappingField build() { + return new ShuttleJobUpdateRequestV2026R0AccountMappingField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0SettingsField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0SettingsField.java new file mode 100644 index 000000000..7e117a6b8 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobupdaterequestv2026r0/ShuttleJobUpdateRequestV2026R0SettingsField.java @@ -0,0 +1,262 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobupdaterequestv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobUpdateRequestV2026R0SettingsField extends SerializableObject { + + /** The maximum transfer bandwidth in bytes per second. `null` when unlimited. */ + @JsonProperty("bandwidth_limit_bytes_per_sec") + @Nullable + protected Long bandwidthLimitBytesPerSec; + + /** Whether deletions in the source system are mirrored in Box. */ + @JsonProperty("are_deletions_mirrored") + protected Boolean areDeletionsMirrored; + + /** Whether prior file versions are synced during the migration. */ + @JsonProperty("are_file_versions_synced") + protected Boolean areFileVersionsSynced; + + /** The maximum number of file versions to sync. `null` when unlimited. */ + @JsonProperty("max_file_versions") + @Nullable + protected Integer maxFileVersions; + + /** Whether existing files in Box are overwritten. */ + @JsonProperty("is_overwrite_enabled") + protected Boolean isOverwriteEnabled; + + /** Whether mappings that already completed successfully are skipped when the job is rerun. */ + @JsonProperty("are_completed_mappings_skipped_on_rerun") + protected Boolean areCompletedMappingsSkippedOnRerun; + + /** + * Whether migrated content is scanned during the migration. Applies only when the source system + * supports content scanning; ignored otherwise. + */ + @JsonProperty("is_content_scanning_enabled") + protected Boolean isContentScanningEnabled; + + /** + * Whether shared folders on the source are included in the migration. Applies only when the + * source system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_source_folders") + protected Boolean includeSharedSourceFolders; + + /** + * Whether shared folders on the destination are included in the migration. Applies only when the + * destination system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_destination_folders") + protected Boolean includeSharedDestinationFolders; + + public ShuttleJobUpdateRequestV2026R0SettingsField() { + super(); + } + + protected ShuttleJobUpdateRequestV2026R0SettingsField(Builder builder) { + super(); + this.bandwidthLimitBytesPerSec = builder.bandwidthLimitBytesPerSec; + this.areDeletionsMirrored = builder.areDeletionsMirrored; + this.areFileVersionsSynced = builder.areFileVersionsSynced; + this.maxFileVersions = builder.maxFileVersions; + this.isOverwriteEnabled = builder.isOverwriteEnabled; + this.areCompletedMappingsSkippedOnRerun = builder.areCompletedMappingsSkippedOnRerun; + this.isContentScanningEnabled = builder.isContentScanningEnabled; + this.includeSharedSourceFolders = builder.includeSharedSourceFolders; + this.includeSharedDestinationFolders = builder.includeSharedDestinationFolders; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Long getBandwidthLimitBytesPerSec() { + return bandwidthLimitBytesPerSec; + } + + public Boolean getAreDeletionsMirrored() { + return areDeletionsMirrored; + } + + public Boolean getAreFileVersionsSynced() { + return areFileVersionsSynced; + } + + public Integer getMaxFileVersions() { + return maxFileVersions; + } + + public Boolean getIsOverwriteEnabled() { + return isOverwriteEnabled; + } + + public Boolean getAreCompletedMappingsSkippedOnRerun() { + return areCompletedMappingsSkippedOnRerun; + } + + public Boolean getIsContentScanningEnabled() { + return isContentScanningEnabled; + } + + public Boolean getIncludeSharedSourceFolders() { + return includeSharedSourceFolders; + } + + public Boolean getIncludeSharedDestinationFolders() { + return includeSharedDestinationFolders; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobUpdateRequestV2026R0SettingsField casted = + (ShuttleJobUpdateRequestV2026R0SettingsField) o; + return Objects.equals(bandwidthLimitBytesPerSec, casted.bandwidthLimitBytesPerSec) + && Objects.equals(areDeletionsMirrored, casted.areDeletionsMirrored) + && Objects.equals(areFileVersionsSynced, casted.areFileVersionsSynced) + && Objects.equals(maxFileVersions, casted.maxFileVersions) + && Objects.equals(isOverwriteEnabled, casted.isOverwriteEnabled) + && Objects.equals( + areCompletedMappingsSkippedOnRerun, casted.areCompletedMappingsSkippedOnRerun) + && Objects.equals(isContentScanningEnabled, casted.isContentScanningEnabled) + && Objects.equals(includeSharedSourceFolders, casted.includeSharedSourceFolders) + && Objects.equals(includeSharedDestinationFolders, casted.includeSharedDestinationFolders); + } + + @Override + public int hashCode() { + return Objects.hash( + bandwidthLimitBytesPerSec, + areDeletionsMirrored, + areFileVersionsSynced, + maxFileVersions, + isOverwriteEnabled, + areCompletedMappingsSkippedOnRerun, + isContentScanningEnabled, + includeSharedSourceFolders, + includeSharedDestinationFolders); + } + + @Override + public String toString() { + return "ShuttleJobUpdateRequestV2026R0SettingsField{" + + "bandwidthLimitBytesPerSec='" + + bandwidthLimitBytesPerSec + + '\'' + + ", " + + "areDeletionsMirrored='" + + areDeletionsMirrored + + '\'' + + ", " + + "areFileVersionsSynced='" + + areFileVersionsSynced + + '\'' + + ", " + + "maxFileVersions='" + + maxFileVersions + + '\'' + + ", " + + "isOverwriteEnabled='" + + isOverwriteEnabled + + '\'' + + ", " + + "areCompletedMappingsSkippedOnRerun='" + + areCompletedMappingsSkippedOnRerun + + '\'' + + ", " + + "isContentScanningEnabled='" + + isContentScanningEnabled + + '\'' + + ", " + + "includeSharedSourceFolders='" + + includeSharedSourceFolders + + '\'' + + ", " + + "includeSharedDestinationFolders='" + + includeSharedDestinationFolders + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Long bandwidthLimitBytesPerSec; + + protected Boolean areDeletionsMirrored; + + protected Boolean areFileVersionsSynced; + + protected Integer maxFileVersions; + + protected Boolean isOverwriteEnabled; + + protected Boolean areCompletedMappingsSkippedOnRerun; + + protected Boolean isContentScanningEnabled; + + protected Boolean includeSharedSourceFolders; + + protected Boolean includeSharedDestinationFolders; + + public Builder bandwidthLimitBytesPerSec(Long bandwidthLimitBytesPerSec) { + this.bandwidthLimitBytesPerSec = bandwidthLimitBytesPerSec; + this.markNullableFieldAsSet("bandwidth_limit_bytes_per_sec"); + return this; + } + + public Builder areDeletionsMirrored(Boolean areDeletionsMirrored) { + this.areDeletionsMirrored = areDeletionsMirrored; + return this; + } + + public Builder areFileVersionsSynced(Boolean areFileVersionsSynced) { + this.areFileVersionsSynced = areFileVersionsSynced; + return this; + } + + public Builder maxFileVersions(Integer maxFileVersions) { + this.maxFileVersions = maxFileVersions; + this.markNullableFieldAsSet("max_file_versions"); + return this; + } + + public Builder isOverwriteEnabled(Boolean isOverwriteEnabled) { + this.isOverwriteEnabled = isOverwriteEnabled; + return this; + } + + public Builder areCompletedMappingsSkippedOnRerun(Boolean areCompletedMappingsSkippedOnRerun) { + this.areCompletedMappingsSkippedOnRerun = areCompletedMappingsSkippedOnRerun; + return this; + } + + public Builder isContentScanningEnabled(Boolean isContentScanningEnabled) { + this.isContentScanningEnabled = isContentScanningEnabled; + return this; + } + + public Builder includeSharedSourceFolders(Boolean includeSharedSourceFolders) { + this.includeSharedSourceFolders = includeSharedSourceFolders; + return this; + } + + public Builder includeSharedDestinationFolders(Boolean includeSharedDestinationFolders) { + this.includeSharedDestinationFolders = includeSharedDestinationFolders; + return this; + } + + public ShuttleJobUpdateRequestV2026R0SettingsField build() { + return new ShuttleJobUpdateRequestV2026R0SettingsField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0.java new file mode 100644 index 000000000..48526fc6a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0.java @@ -0,0 +1,361 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** + * A standard representation of a shuttle job. A shuttle job describes a migration of content from a + * source system into Box, including its current state, mapping-preparation state, and mapping + * configuration. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle job. */ + protected final String id; + + /** The value will always be `shuttle_job`. */ + @JsonDeserialize(using = ShuttleJobV2026R0TypeField.ShuttleJobV2026R0TypeFieldDeserializer.class) + @JsonSerialize(using = ShuttleJobV2026R0TypeField.ShuttleJobV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The human-readable name of the shuttle job. */ + protected final String name; + + /** An optional free-form comment describing the shuttle job. */ + @Nullable protected String comment; + + /** The type of work the shuttle job performs. */ + @JsonDeserialize( + using = ShuttleJobV2026R0JobTypeField.ShuttleJobV2026R0JobTypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttleJobV2026R0JobTypeField.ShuttleJobV2026R0JobTypeFieldSerializer.class) + @JsonProperty("job_type") + protected final EnumWrapper jobType; + + /** + * The current state of the shuttle job. This is an open string whose set of values is expected to + * grow; the currently documented values include `created`, `started`, `stopped`, `completed`, + * `failed`, `invalid`, and `unknown`. Clients should treat any value they do not recognize as + * `unknown`. + */ + protected final String state; + + /** + * The current mapping-preparation state of the job. This is an open string whose set of values is + * expected to grow; the currently documented values include `awaiting_path_mapping`, + * `importing_paths`, `paths_import_rejected`, `paths_invalid`, `paths_ready`, `scanning_source`, + * `source_scan_failed`, `source_scan_out_of_date`, `awaiting_subject_mapping`, + * `importing_subjects`, `subjects_import_rejected`, `mapping_complete`, `building_map`, + * `map_build_failed`, `map_out_of_date`, and `ready`. `paths_import_rejected` means the last + * path-mapping spreadsheet was rejected or failed and the path mappings have not been changed + * since; it clears on the next import or the next manual path-mapping change. + * `subjects_import_rejected` means the last subject-mapping spreadsheet was rejected or failed + * and the subject mappings have not been changed since; it clears on the next import or the next + * manual subject-mapping change. + */ + @JsonProperty("mapping_state") + protected final String mappingState; + + /** The source system the shuttle job migrates content from. */ + @JsonProperty("source_system") + protected final ShuttleJobV2026R0SourceSystemField sourceSystem; + + /** + * The account mapping configuration that controls how source identities and permissions are + * translated into Box. + */ + @JsonProperty("account_mapping") + protected ShuttleJobV2026R0AccountMappingField accountMapping; + + /** A list of free-form tags associated with the shuttle job. */ + protected List tags; + + /** The tunable settings that control how the shuttle job runs. */ + protected ShuttleJobV2026R0SettingsField settings; + + public ShuttleJobV2026R0( + String id, + String name, + ShuttleJobV2026R0JobTypeField jobType, + String state, + String mappingState, + ShuttleJobV2026R0SourceSystemField sourceSystem) { + super(); + this.id = id; + this.name = name; + this.jobType = new EnumWrapper(jobType); + this.state = state; + this.mappingState = mappingState; + this.sourceSystem = sourceSystem; + this.type = new EnumWrapper(ShuttleJobV2026R0TypeField.SHUTTLE_JOB); + } + + public ShuttleJobV2026R0( + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("job_type") EnumWrapper jobType, + @JsonProperty("state") String state, + @JsonProperty("mapping_state") String mappingState, + @JsonProperty("source_system") ShuttleJobV2026R0SourceSystemField sourceSystem) { + super(); + this.id = id; + this.name = name; + this.jobType = jobType; + this.state = state; + this.mappingState = mappingState; + this.sourceSystem = sourceSystem; + this.type = new EnumWrapper(ShuttleJobV2026R0TypeField.SHUTTLE_JOB); + } + + protected ShuttleJobV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.name = builder.name; + this.comment = builder.comment; + this.jobType = builder.jobType; + this.state = builder.state; + this.mappingState = builder.mappingState; + this.sourceSystem = builder.sourceSystem; + this.accountMapping = builder.accountMapping; + this.tags = builder.tags; + this.settings = builder.settings; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getName() { + return name; + } + + public String getComment() { + return comment; + } + + public EnumWrapper getJobType() { + return jobType; + } + + public String getState() { + return state; + } + + public String getMappingState() { + return mappingState; + } + + public ShuttleJobV2026R0SourceSystemField getSourceSystem() { + return sourceSystem; + } + + public ShuttleJobV2026R0AccountMappingField getAccountMapping() { + return accountMapping; + } + + public List getTags() { + return tags; + } + + public ShuttleJobV2026R0SettingsField getSettings() { + return settings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobV2026R0 casted = (ShuttleJobV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(name, casted.name) + && Objects.equals(comment, casted.comment) + && Objects.equals(jobType, casted.jobType) + && Objects.equals(state, casted.state) + && Objects.equals(mappingState, casted.mappingState) + && Objects.equals(sourceSystem, casted.sourceSystem) + && Objects.equals(accountMapping, casted.accountMapping) + && Objects.equals(tags, casted.tags) + && Objects.equals(settings, casted.settings); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + name, + comment, + jobType, + state, + mappingState, + sourceSystem, + accountMapping, + tags, + settings); + } + + @Override + public String toString() { + return "ShuttleJobV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "name='" + + name + + '\'' + + ", " + + "comment='" + + comment + + '\'' + + ", " + + "jobType='" + + jobType + + '\'' + + ", " + + "state='" + + state + + '\'' + + ", " + + "mappingState='" + + mappingState + + '\'' + + ", " + + "sourceSystem='" + + sourceSystem + + '\'' + + ", " + + "accountMapping='" + + accountMapping + + '\'' + + ", " + + "tags='" + + tags + + '\'' + + ", " + + "settings='" + + settings + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String name; + + protected String comment; + + protected final EnumWrapper jobType; + + protected final String state; + + protected final String mappingState; + + protected final ShuttleJobV2026R0SourceSystemField sourceSystem; + + protected ShuttleJobV2026R0AccountMappingField accountMapping; + + protected List tags; + + protected ShuttleJobV2026R0SettingsField settings; + + public Builder( + String id, + String name, + ShuttleJobV2026R0JobTypeField jobType, + String state, + String mappingState, + ShuttleJobV2026R0SourceSystemField sourceSystem) { + super(); + this.id = id; + this.name = name; + this.jobType = new EnumWrapper(jobType); + this.state = state; + this.mappingState = mappingState; + this.sourceSystem = sourceSystem; + } + + public Builder( + String id, + String name, + EnumWrapper jobType, + String state, + String mappingState, + ShuttleJobV2026R0SourceSystemField sourceSystem) { + super(); + this.id = id; + this.name = name; + this.jobType = jobType; + this.state = state; + this.mappingState = mappingState; + this.sourceSystem = sourceSystem; + } + + public Builder type(ShuttleJobV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder comment(String comment) { + this.comment = comment; + this.markNullableFieldAsSet("comment"); + return this; + } + + public Builder accountMapping(ShuttleJobV2026R0AccountMappingField accountMapping) { + this.accountMapping = accountMapping; + return this; + } + + public Builder tags(List tags) { + this.tags = tags; + return this; + } + + public Builder settings(ShuttleJobV2026R0SettingsField settings) { + this.settings = settings; + return this; + } + + public ShuttleJobV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper(ShuttleJobV2026R0TypeField.SHUTTLE_JOB); + } + return new ShuttleJobV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0AccountMappingField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0AccountMappingField.java new file mode 100644 index 000000000..699ae29cd --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0AccountMappingField.java @@ -0,0 +1,154 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlejobpermissionconflictstrategyv2026r0.ShuttleJobPermissionConflictStrategyV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobV2026R0AccountMappingField extends SerializableObject { + + /** Whether account mapping is enabled for the shuttle job. */ + @JsonProperty("is_enabled") + protected final boolean isEnabled; + + /** The strategy used to resolve permission conflicts. `null` when unset. */ + @JsonDeserialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Deserializer.class) + @JsonSerialize( + using = + ShuttleJobPermissionConflictStrategyV2026R0 + .ShuttleJobPermissionConflictStrategyV2026R0Serializer.class) + @JsonProperty("permission_conflict_strategy") + protected EnumWrapper permissionConflictStrategy; + + /** Whether external shares are mapped during the migration. */ + @JsonProperty("are_external_shares_mapped") + protected Boolean areExternalSharesMapped; + + /** Whether permissions are mapped during the migration. */ + @JsonProperty("are_permissions_mapped") + protected Boolean arePermissionsMapped; + + public ShuttleJobV2026R0AccountMappingField(@JsonProperty("is_enabled") boolean isEnabled) { + super(); + this.isEnabled = isEnabled; + } + + protected ShuttleJobV2026R0AccountMappingField(Builder builder) { + super(); + this.isEnabled = builder.isEnabled; + this.permissionConflictStrategy = builder.permissionConflictStrategy; + this.areExternalSharesMapped = builder.areExternalSharesMapped; + this.arePermissionsMapped = builder.arePermissionsMapped; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public boolean getIsEnabled() { + return isEnabled; + } + + public EnumWrapper getPermissionConflictStrategy() { + return permissionConflictStrategy; + } + + public Boolean getAreExternalSharesMapped() { + return areExternalSharesMapped; + } + + public Boolean getArePermissionsMapped() { + return arePermissionsMapped; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobV2026R0AccountMappingField casted = (ShuttleJobV2026R0AccountMappingField) o; + return Objects.equals(isEnabled, casted.isEnabled) + && Objects.equals(permissionConflictStrategy, casted.permissionConflictStrategy) + && Objects.equals(areExternalSharesMapped, casted.areExternalSharesMapped) + && Objects.equals(arePermissionsMapped, casted.arePermissionsMapped); + } + + @Override + public int hashCode() { + return Objects.hash( + isEnabled, permissionConflictStrategy, areExternalSharesMapped, arePermissionsMapped); + } + + @Override + public String toString() { + return "ShuttleJobV2026R0AccountMappingField{" + + "isEnabled='" + + isEnabled + + '\'' + + ", " + + "permissionConflictStrategy='" + + permissionConflictStrategy + + '\'' + + ", " + + "areExternalSharesMapped='" + + areExternalSharesMapped + + '\'' + + ", " + + "arePermissionsMapped='" + + arePermissionsMapped + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final boolean isEnabled; + + protected EnumWrapper permissionConflictStrategy; + + protected Boolean areExternalSharesMapped; + + protected Boolean arePermissionsMapped; + + public Builder(boolean isEnabled) { + super(); + this.isEnabled = isEnabled; + } + + public Builder permissionConflictStrategy( + ShuttleJobPermissionConflictStrategyV2026R0 permissionConflictStrategy) { + this.permissionConflictStrategy = + new EnumWrapper(permissionConflictStrategy); + return this; + } + + public Builder permissionConflictStrategy( + EnumWrapper permissionConflictStrategy) { + this.permissionConflictStrategy = permissionConflictStrategy; + return this; + } + + public Builder areExternalSharesMapped(Boolean areExternalSharesMapped) { + this.areExternalSharesMapped = areExternalSharesMapped; + return this; + } + + public Builder arePermissionsMapped(Boolean arePermissionsMapped) { + this.arePermissionsMapped = arePermissionsMapped; + return this; + } + + public ShuttleJobV2026R0AccountMappingField build() { + return new ShuttleJobV2026R0AccountMappingField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0JobTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0JobTypeField.java new file mode 100644 index 000000000..c88e80cfa --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0JobTypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobV2026R0JobTypeField implements Valuable { + TRANSFER("transfer"), + ANALYSIS("analysis"); + + private final String value; + + ShuttleJobV2026R0JobTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobV2026R0JobTypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobV2026R0JobTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobV2026R0JobTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobV2026R0JobTypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobV2026R0JobTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SettingsField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SettingsField.java new file mode 100644 index 000000000..a78158379 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SettingsField.java @@ -0,0 +1,261 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobV2026R0SettingsField extends SerializableObject { + + /** The maximum transfer bandwidth in bytes per second. `null` when unlimited. */ + @JsonProperty("bandwidth_limit_bytes_per_sec") + @Nullable + protected Long bandwidthLimitBytesPerSec; + + /** Whether deletions in the source system are mirrored in Box. */ + @JsonProperty("are_deletions_mirrored") + protected Boolean areDeletionsMirrored; + + /** Whether prior file versions are synced during the migration. */ + @JsonProperty("are_file_versions_synced") + protected Boolean areFileVersionsSynced; + + /** The maximum number of file versions to sync. `null` when unlimited. */ + @JsonProperty("max_file_versions") + @Nullable + protected Integer maxFileVersions; + + /** Whether existing files in Box are overwritten. */ + @JsonProperty("is_overwrite_enabled") + protected Boolean isOverwriteEnabled; + + /** Whether mappings that already completed successfully are skipped when the job is rerun. */ + @JsonProperty("are_completed_mappings_skipped_on_rerun") + protected Boolean areCompletedMappingsSkippedOnRerun; + + /** + * Whether migrated content is scanned during the migration. Applies only when the source system + * supports content scanning; ignored otherwise. + */ + @JsonProperty("is_content_scanning_enabled") + protected Boolean isContentScanningEnabled; + + /** + * Whether shared folders on the source are included in the migration. Applies only when the + * source system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_source_folders") + protected Boolean includeSharedSourceFolders; + + /** + * Whether shared folders on the destination are included in the migration. Applies only when the + * destination system supports shared folders; ignored otherwise. + */ + @JsonProperty("include_shared_destination_folders") + protected Boolean includeSharedDestinationFolders; + + public ShuttleJobV2026R0SettingsField() { + super(); + } + + protected ShuttleJobV2026R0SettingsField(Builder builder) { + super(); + this.bandwidthLimitBytesPerSec = builder.bandwidthLimitBytesPerSec; + this.areDeletionsMirrored = builder.areDeletionsMirrored; + this.areFileVersionsSynced = builder.areFileVersionsSynced; + this.maxFileVersions = builder.maxFileVersions; + this.isOverwriteEnabled = builder.isOverwriteEnabled; + this.areCompletedMappingsSkippedOnRerun = builder.areCompletedMappingsSkippedOnRerun; + this.isContentScanningEnabled = builder.isContentScanningEnabled; + this.includeSharedSourceFolders = builder.includeSharedSourceFolders; + this.includeSharedDestinationFolders = builder.includeSharedDestinationFolders; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Long getBandwidthLimitBytesPerSec() { + return bandwidthLimitBytesPerSec; + } + + public Boolean getAreDeletionsMirrored() { + return areDeletionsMirrored; + } + + public Boolean getAreFileVersionsSynced() { + return areFileVersionsSynced; + } + + public Integer getMaxFileVersions() { + return maxFileVersions; + } + + public Boolean getIsOverwriteEnabled() { + return isOverwriteEnabled; + } + + public Boolean getAreCompletedMappingsSkippedOnRerun() { + return areCompletedMappingsSkippedOnRerun; + } + + public Boolean getIsContentScanningEnabled() { + return isContentScanningEnabled; + } + + public Boolean getIncludeSharedSourceFolders() { + return includeSharedSourceFolders; + } + + public Boolean getIncludeSharedDestinationFolders() { + return includeSharedDestinationFolders; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobV2026R0SettingsField casted = (ShuttleJobV2026R0SettingsField) o; + return Objects.equals(bandwidthLimitBytesPerSec, casted.bandwidthLimitBytesPerSec) + && Objects.equals(areDeletionsMirrored, casted.areDeletionsMirrored) + && Objects.equals(areFileVersionsSynced, casted.areFileVersionsSynced) + && Objects.equals(maxFileVersions, casted.maxFileVersions) + && Objects.equals(isOverwriteEnabled, casted.isOverwriteEnabled) + && Objects.equals( + areCompletedMappingsSkippedOnRerun, casted.areCompletedMappingsSkippedOnRerun) + && Objects.equals(isContentScanningEnabled, casted.isContentScanningEnabled) + && Objects.equals(includeSharedSourceFolders, casted.includeSharedSourceFolders) + && Objects.equals(includeSharedDestinationFolders, casted.includeSharedDestinationFolders); + } + + @Override + public int hashCode() { + return Objects.hash( + bandwidthLimitBytesPerSec, + areDeletionsMirrored, + areFileVersionsSynced, + maxFileVersions, + isOverwriteEnabled, + areCompletedMappingsSkippedOnRerun, + isContentScanningEnabled, + includeSharedSourceFolders, + includeSharedDestinationFolders); + } + + @Override + public String toString() { + return "ShuttleJobV2026R0SettingsField{" + + "bandwidthLimitBytesPerSec='" + + bandwidthLimitBytesPerSec + + '\'' + + ", " + + "areDeletionsMirrored='" + + areDeletionsMirrored + + '\'' + + ", " + + "areFileVersionsSynced='" + + areFileVersionsSynced + + '\'' + + ", " + + "maxFileVersions='" + + maxFileVersions + + '\'' + + ", " + + "isOverwriteEnabled='" + + isOverwriteEnabled + + '\'' + + ", " + + "areCompletedMappingsSkippedOnRerun='" + + areCompletedMappingsSkippedOnRerun + + '\'' + + ", " + + "isContentScanningEnabled='" + + isContentScanningEnabled + + '\'' + + ", " + + "includeSharedSourceFolders='" + + includeSharedSourceFolders + + '\'' + + ", " + + "includeSharedDestinationFolders='" + + includeSharedDestinationFolders + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Long bandwidthLimitBytesPerSec; + + protected Boolean areDeletionsMirrored; + + protected Boolean areFileVersionsSynced; + + protected Integer maxFileVersions; + + protected Boolean isOverwriteEnabled; + + protected Boolean areCompletedMappingsSkippedOnRerun; + + protected Boolean isContentScanningEnabled; + + protected Boolean includeSharedSourceFolders; + + protected Boolean includeSharedDestinationFolders; + + public Builder bandwidthLimitBytesPerSec(Long bandwidthLimitBytesPerSec) { + this.bandwidthLimitBytesPerSec = bandwidthLimitBytesPerSec; + this.markNullableFieldAsSet("bandwidth_limit_bytes_per_sec"); + return this; + } + + public Builder areDeletionsMirrored(Boolean areDeletionsMirrored) { + this.areDeletionsMirrored = areDeletionsMirrored; + return this; + } + + public Builder areFileVersionsSynced(Boolean areFileVersionsSynced) { + this.areFileVersionsSynced = areFileVersionsSynced; + return this; + } + + public Builder maxFileVersions(Integer maxFileVersions) { + this.maxFileVersions = maxFileVersions; + this.markNullableFieldAsSet("max_file_versions"); + return this; + } + + public Builder isOverwriteEnabled(Boolean isOverwriteEnabled) { + this.isOverwriteEnabled = isOverwriteEnabled; + return this; + } + + public Builder areCompletedMappingsSkippedOnRerun(Boolean areCompletedMappingsSkippedOnRerun) { + this.areCompletedMappingsSkippedOnRerun = areCompletedMappingsSkippedOnRerun; + return this; + } + + public Builder isContentScanningEnabled(Boolean isContentScanningEnabled) { + this.isContentScanningEnabled = isContentScanningEnabled; + return this; + } + + public Builder includeSharedSourceFolders(Boolean includeSharedSourceFolders) { + this.includeSharedSourceFolders = includeSharedSourceFolders; + return this; + } + + public Builder includeSharedDestinationFolders(Boolean includeSharedDestinationFolders) { + this.includeSharedDestinationFolders = includeSharedDestinationFolders; + return this; + } + + public ShuttleJobV2026R0SettingsField build() { + return new ShuttleJobV2026R0SettingsField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemField.java new file mode 100644 index 000000000..15449e53b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemField.java @@ -0,0 +1,131 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleJobV2026R0SourceSystemField extends SerializableObject { + + /** The value will always be `shuttle_system`. */ + @JsonDeserialize( + using = + ShuttleJobV2026R0SourceSystemTypeField.ShuttleJobV2026R0SourceSystemTypeFieldDeserializer + .class) + @JsonSerialize( + using = + ShuttleJobV2026R0SourceSystemTypeField.ShuttleJobV2026R0SourceSystemTypeFieldSerializer + .class) + protected EnumWrapper type; + + /** The unique identifier for the source system. */ + protected final String id; + + /** The human-readable name of the source system. */ + protected final String name; + + public ShuttleJobV2026R0SourceSystemField( + @JsonProperty("id") String id, @JsonProperty("name") String name) { + super(); + this.id = id; + this.name = name; + this.type = + new EnumWrapper( + ShuttleJobV2026R0SourceSystemTypeField.SHUTTLE_SYSTEM); + } + + protected ShuttleJobV2026R0SourceSystemField(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + this.name = builder.name; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleJobV2026R0SourceSystemField casted = (ShuttleJobV2026R0SourceSystemField) o; + return Objects.equals(type, casted.type) + && Objects.equals(id, casted.id) + && Objects.equals(name, casted.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name); + } + + @Override + public String toString() { + return "ShuttleJobV2026R0SourceSystemField{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + ", " + + "name='" + + name + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String id; + + protected final String name; + + public Builder(String id, String name) { + super(); + this.id = id; + this.name = name; + } + + public Builder type(ShuttleJobV2026R0SourceSystemTypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public ShuttleJobV2026R0SourceSystemField build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleJobV2026R0SourceSystemTypeField.SHUTTLE_SYSTEM); + } + return new ShuttleJobV2026R0SourceSystemField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemTypeField.java new file mode 100644 index 000000000..fd567bce8 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0SourceSystemTypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobV2026R0SourceSystemTypeField implements Valuable { + SHUTTLE_SYSTEM("shuttle_system"); + + private final String value; + + ShuttleJobV2026R0SourceSystemTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobV2026R0SourceSystemTypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobV2026R0SourceSystemTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobV2026R0SourceSystemTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobV2026R0SourceSystemTypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobV2026R0SourceSystemTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0TypeField.java new file mode 100644 index 000000000..d6ffbd9cb --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlejobv2026r0/ShuttleJobV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlejobv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleJobV2026R0TypeField implements Valuable { + SHUTTLE_JOB("shuttle_job"); + + private final String value; + + ShuttleJobV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleJobV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleJobV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleJobV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleJobV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleJobV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorsv2026r0/ShuttleMappingErrorsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorsv2026r0/ShuttleMappingErrorsV2026R0.java new file mode 100644 index 000000000..5e83e36bf --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorsv2026r0/ShuttleMappingErrorsV2026R0.java @@ -0,0 +1,143 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlemappingerrorsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlemappingerrorv2026r0.ShuttleMappingErrorV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle mapping errors. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleMappingErrorsV2026R0 extends SerializableObject { + + /** A list of shuttle mapping errors. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleMappingErrorsV2026R0( + @JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleMappingErrorsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleMappingErrorsV2026R0 casted = (ShuttleMappingErrorsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleMappingErrorsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleMappingErrorsV2026R0 build() { + return new ShuttleMappingErrorsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0.java new file mode 100644 index 000000000..0c2d2727b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0.java @@ -0,0 +1,216 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlemappingerrorv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** + * A problem encountered while preparing path, subject, or permission mappings for a shuttle job. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleMappingErrorV2026R0 extends SerializableObject { + + /** The unique identifier for the mapping error. */ + protected final String id; + + /** The value will always be `shuttle_mapping_error`. */ + @JsonDeserialize( + using = + ShuttleMappingErrorV2026R0TypeField.ShuttleMappingErrorV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleMappingErrorV2026R0TypeField.ShuttleMappingErrorV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this error belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** The mapping revision this error belongs to. */ + protected final int revision; + + /** + * The category of mapping work that produced the error. This is an open string whose set of + * values can grow. + */ + protected final String category; + + /** The path or subject that the mapping error refers to. */ + protected final String path; + + /** Human-readable messages describing the mapping error. */ + protected final List messages; + + public ShuttleMappingErrorV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("revision") int revision, + @JsonProperty("category") String category, + @JsonProperty("path") String path, + @JsonProperty("messages") List messages) { + super(); + this.id = id; + this.jobId = jobId; + this.revision = revision; + this.category = category; + this.path = path; + this.messages = messages; + this.type = + new EnumWrapper( + ShuttleMappingErrorV2026R0TypeField.SHUTTLE_MAPPING_ERROR); + } + + protected ShuttleMappingErrorV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.revision = builder.revision; + this.category = builder.category; + this.path = builder.path; + this.messages = builder.messages; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public int getRevision() { + return revision; + } + + public String getCategory() { + return category; + } + + public String getPath() { + return path; + } + + public List getMessages() { + return messages; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleMappingErrorV2026R0 casted = (ShuttleMappingErrorV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(revision, casted.revision) + && Objects.equals(category, casted.category) + && Objects.equals(path, casted.path) + && Objects.equals(messages, casted.messages); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, jobId, revision, category, path, messages); + } + + @Override + public String toString() { + return "ShuttleMappingErrorV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "revision='" + + revision + + '\'' + + ", " + + "category='" + + category + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "messages='" + + messages + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected final int revision; + + protected final String category; + + protected final String path; + + protected final List messages; + + public Builder( + String id, + String jobId, + int revision, + String category, + String path, + List messages) { + super(); + this.id = id; + this.jobId = jobId; + this.revision = revision; + this.category = category; + this.path = path; + this.messages = messages; + } + + public Builder type(ShuttleMappingErrorV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public ShuttleMappingErrorV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleMappingErrorV2026R0TypeField.SHUTTLE_MAPPING_ERROR); + } + return new ShuttleMappingErrorV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0TypeField.java new file mode 100644 index 000000000..e59e85a64 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlemappingerrorv2026r0/ShuttleMappingErrorV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlemappingerrorv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleMappingErrorV2026R0TypeField implements Valuable { + SHUTTLE_MAPPING_ERROR("shuttle_mapping_error"); + + private final String value; + + ShuttleMappingErrorV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleMappingErrorV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleMappingErrorV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleMappingErrorV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleMappingErrorV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleMappingErrorV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentriesv2026r0/ShuttlePathEntriesV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentriesv2026r0/ShuttlePathEntriesV2026R0.java new file mode 100644 index 000000000..f4a7a7616 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentriesv2026r0/ShuttlePathEntriesV2026R0.java @@ -0,0 +1,142 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentriesv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentryv2026r0.ShuttlePathEntryV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle path entries. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathEntriesV2026R0 extends SerializableObject { + + /** A list of shuttle path entries. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttlePathEntriesV2026R0(@JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttlePathEntriesV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathEntriesV2026R0 casted = (ShuttlePathEntriesV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttlePathEntriesV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttlePathEntriesV2026R0 build() { + return new ShuttlePathEntriesV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0.java new file mode 100644 index 000000000..0f149b659 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0.java @@ -0,0 +1,176 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentryaccountscopev2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * The mapping scope of a path entry that lives under a user or service account. `type` is the + * discriminator. The remaining fields are the account itself, flattened onto this object — they are + * not a nested `account` wrapper. `id` here is the account identifier, not the path entry `id`. + * Copy these fields onto `account` when creating an account-scoped path mapping. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathEntryAccountScopeV2026R0 extends SerializableObject { + + /** The value will always be `account`. */ + @JsonDeserialize( + using = + ShuttlePathEntryAccountScopeV2026R0TypeField + .ShuttlePathEntryAccountScopeV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathEntryAccountScopeV2026R0TypeField + .ShuttlePathEntryAccountScopeV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** + * The platform-native identifier of the account that owns this entry. `null` when the system does + * not provide one. This is not the path entry `id`. Maps to `account.id` on an account-scoped + * path mapping location. + */ + @Nullable protected String id; + + /** + * The email of the account that owns this entry. This is a system-native identifier and is not + * always an RFC 5322 address. `null` when unknown. Maps to `account.email` on an account-scoped + * path mapping location. + */ + @Nullable protected String email; + + /** + * The display name of the account that owns this entry. `null` when unknown. Maps to + * `account.name` on an account-scoped path mapping location. + */ + @Nullable protected String name; + + public ShuttlePathEntryAccountScopeV2026R0() { + super(); + this.type = + new EnumWrapper( + ShuttlePathEntryAccountScopeV2026R0TypeField.ACCOUNT); + } + + protected ShuttlePathEntryAccountScopeV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + this.email = builder.email; + this.name = builder.name; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + public String getEmail() { + return email; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathEntryAccountScopeV2026R0 casted = (ShuttlePathEntryAccountScopeV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(id, casted.id) + && Objects.equals(email, casted.email) + && Objects.equals(name, casted.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, email, name); + } + + @Override + public String toString() { + return "ShuttlePathEntryAccountScopeV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + ", " + + "email='" + + email + + '\'' + + ", " + + "name='" + + name + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected String id; + + protected String email; + + protected String name; + + public Builder() { + super(); + } + + public Builder type(ShuttlePathEntryAccountScopeV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder id(String id) { + this.id = id; + this.markNullableFieldAsSet("id"); + return this; + } + + public Builder email(String email) { + this.email = email; + this.markNullableFieldAsSet("email"); + return this; + } + + public Builder name(String name) { + this.name = name; + this.markNullableFieldAsSet("name"); + return this; + } + + public ShuttlePathEntryAccountScopeV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathEntryAccountScopeV2026R0TypeField.ACCOUNT); + } + return new ShuttlePathEntryAccountScopeV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0TypeField.java new file mode 100644 index 000000000..5a9487257 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryaccountscopev2026r0/ShuttlePathEntryAccountScopeV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentryaccountscopev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathEntryAccountScopeV2026R0TypeField implements Valuable { + ACCOUNT("account"); + + private final String value; + + ShuttlePathEntryAccountScopeV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathEntryAccountScopeV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathEntryAccountScopeV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathEntryAccountScopeV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathEntryAccountScopeV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathEntryAccountScopeV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryscopev2026r0/ShuttlePathEntryScopeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryscopev2026r0/ShuttlePathEntryScopeV2026R0.java new file mode 100644 index 000000000..95dd61f45 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryscopev2026r0/ShuttlePathEntryScopeV2026R0.java @@ -0,0 +1,82 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentryscopev2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentryaccountscopev2026r0.ShuttlePathEntryAccountScopeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentrysharedspacescopev2026r0.ShuttlePathEntrySharedSpaceScopeV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = ShuttlePathEntryScopeV2026R0.ShuttlePathEntryScopeV2026R0Deserializer.class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class ShuttlePathEntryScopeV2026R0 + extends OneOfTwo { + + protected final String type; + + public ShuttlePathEntryScopeV2026R0( + ShuttlePathEntryAccountScopeV2026R0 shuttlePathEntryAccountScopeV2026R0) { + super(shuttlePathEntryAccountScopeV2026R0, null); + this.type = EnumWrapper.convertToString(shuttlePathEntryAccountScopeV2026R0.getType()); + } + + public ShuttlePathEntryScopeV2026R0( + ShuttlePathEntrySharedSpaceScopeV2026R0 shuttlePathEntrySharedSpaceScopeV2026R0) { + super(null, shuttlePathEntrySharedSpaceScopeV2026R0); + this.type = EnumWrapper.convertToString(shuttlePathEntrySharedSpaceScopeV2026R0.getType()); + } + + public boolean isShuttlePathEntryAccountScopeV2026R0() { + return value0 != null; + } + + public ShuttlePathEntryAccountScopeV2026R0 getShuttlePathEntryAccountScopeV2026R0() { + return value0; + } + + public boolean isShuttlePathEntrySharedSpaceScopeV2026R0() { + return value1 != null; + } + + public ShuttlePathEntrySharedSpaceScopeV2026R0 getShuttlePathEntrySharedSpaceScopeV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + static class ShuttlePathEntryScopeV2026R0Deserializer + extends JsonDeserializer { + + public ShuttlePathEntryScopeV2026R0Deserializer() { + super(); + } + + @Override + public ShuttlePathEntryScopeV2026R0 deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "account": + return new ShuttlePathEntryScopeV2026R0( + JsonManager.deserialize(node, ShuttlePathEntryAccountScopeV2026R0.class)); + case "shared_space": + return new ShuttlePathEntryScopeV2026R0( + JsonManager.deserialize(node, ShuttlePathEntrySharedSpaceScopeV2026R0.class)); + } + } + throw new JsonMappingException(jp, "Unable to deserialize ShuttlePathEntryScopeV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0.java new file mode 100644 index 000000000..e1f88d5f8 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0.java @@ -0,0 +1,124 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentrysharedspacescopev2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * The mapping scope of a path entry that lives under a shared container such as a site, team drive, + * bucket, or file share. `type` is the discriminator. Copy `space` onto a shared-space path mapping + * location when creating a mapping from this row. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathEntrySharedSpaceScopeV2026R0 extends SerializableObject { + + /** The value will always be `shared_space`. */ + @JsonDeserialize( + using = + ShuttlePathEntrySharedSpaceScopeV2026R0TypeField + .ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathEntrySharedSpaceScopeV2026R0TypeField + .ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** + * The display name of the shared container this entry belongs to. `null` when the system has a + * single implicit container. Maps to `space` on a shared-space path mapping location. + */ + @Nullable protected String space; + + public ShuttlePathEntrySharedSpaceScopeV2026R0() { + super(); + this.type = + new EnumWrapper( + ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.SHARED_SPACE); + } + + protected ShuttlePathEntrySharedSpaceScopeV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.space = builder.space; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getSpace() { + return space; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathEntrySharedSpaceScopeV2026R0 casted = (ShuttlePathEntrySharedSpaceScopeV2026R0) o; + return Objects.equals(type, casted.type) && Objects.equals(space, casted.space); + } + + @Override + public int hashCode() { + return Objects.hash(type, space); + } + + @Override + public String toString() { + return "ShuttlePathEntrySharedSpaceScopeV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "space='" + + space + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected String space; + + public Builder() { + super(); + } + + public Builder type(ShuttlePathEntrySharedSpaceScopeV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder space(String space) { + this.space = space; + this.markNullableFieldAsSet("space"); + return this; + } + + public ShuttlePathEntrySharedSpaceScopeV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.SHARED_SPACE); + } + return new ShuttlePathEntrySharedSpaceScopeV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.java new file mode 100644 index 000000000..26ae91cc4 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentrysharedspacescopev2026r0/ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentrysharedspacescopev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathEntrySharedSpaceScopeV2026R0TypeField implements Valuable { + SHARED_SPACE("shared_space"); + + private final String value; + + ShuttlePathEntrySharedSpaceScopeV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathEntrySharedSpaceScopeV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0.java new file mode 100644 index 000000000..01c3e2bdb --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0.java @@ -0,0 +1,341 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentryv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentryaccountscopev2026r0.ShuttlePathEntryAccountScopeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentryscopev2026r0.ShuttlePathEntryScopeV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathentrysharedspacescopev2026r0.ShuttlePathEntrySharedSpaceScopeV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A browsable entry on the source or target system used to build shuttle path mappings. Shared + * fields describe the node. `scope` is a discriminated object that identifies the mapping namespace + * so a path mapping can be created from this row without extra browse state. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathEntryV2026R0 extends SerializableObject { + + /** + * The unique identifier of this browse row. This is not the account identifier; when `scope.type` + * is `account`, the account identifier is `scope.id`. + */ + protected final String id; + + /** The value will always be `shuttle_path_entry`. */ + @JsonDeserialize( + using = ShuttlePathEntryV2026R0TypeField.ShuttlePathEntryV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttlePathEntryV2026R0TypeField.ShuttlePathEntryV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The display name of the path entry. */ + protected final String name; + + /** The human-readable path of the entry. */ + protected final String path; + + /** + * The system-native identifier of the path. `null` when the selected system does not provide one. + * Maps to `path_id` on a path mapping location. + */ + @JsonProperty("path_id") + @Nullable + protected String pathId; + + /** The human-readable path of the parent entry, or `null` for a root entry. */ + @JsonProperty("parent_path") + @Nullable + protected String parentPath; + + protected final ShuttlePathEntryScopeV2026R0 scope; + + /** + * Whether the entry is a directory (`true`) or a single file (`false`). Maps to `is_directory` on + * a path mapping location. + */ + @JsonProperty("is_directory") + protected final boolean isDirectory; + + /** Whether the entry can be selected in a path mapping. */ + @JsonProperty("can_map") + protected final boolean canMap; + + public ShuttlePathEntryV2026R0( + String id, + String name, + String path, + ShuttlePathEntryAccountScopeV2026R0 scope, + boolean isDirectory, + boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = new ShuttlePathEntryScopeV2026R0(scope); + this.isDirectory = isDirectory; + this.canMap = canMap; + this.type = + new EnumWrapper( + ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY); + } + + public ShuttlePathEntryV2026R0( + String id, + String name, + String path, + ShuttlePathEntrySharedSpaceScopeV2026R0 scope, + boolean isDirectory, + boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = new ShuttlePathEntryScopeV2026R0(scope); + this.isDirectory = isDirectory; + this.canMap = canMap; + this.type = + new EnumWrapper( + ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY); + } + + public ShuttlePathEntryV2026R0( + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("path") String path, + @JsonProperty("scope") ShuttlePathEntryScopeV2026R0 scope, + @JsonProperty("is_directory") boolean isDirectory, + @JsonProperty("can_map") boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = scope; + this.isDirectory = isDirectory; + this.canMap = canMap; + this.type = + new EnumWrapper( + ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY); + } + + protected ShuttlePathEntryV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.name = builder.name; + this.path = builder.path; + this.pathId = builder.pathId; + this.parentPath = builder.parentPath; + this.scope = builder.scope; + this.isDirectory = builder.isDirectory; + this.canMap = builder.canMap; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getName() { + return name; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public String getParentPath() { + return parentPath; + } + + public ShuttlePathEntryScopeV2026R0 getScope() { + return scope; + } + + public boolean getIsDirectory() { + return isDirectory; + } + + public boolean getCanMap() { + return canMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathEntryV2026R0 casted = (ShuttlePathEntryV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(name, casted.name) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(parentPath, casted.parentPath) + && Objects.equals(scope, casted.scope) + && Objects.equals(isDirectory, casted.isDirectory) + && Objects.equals(canMap, casted.canMap); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, name, path, pathId, parentPath, scope, isDirectory, canMap); + } + + @Override + public String toString() { + return "ShuttlePathEntryV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "name='" + + name + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "parentPath='" + + parentPath + + '\'' + + ", " + + "scope='" + + scope + + '\'' + + ", " + + "isDirectory='" + + isDirectory + + '\'' + + ", " + + "canMap='" + + canMap + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String name; + + protected final String path; + + protected String pathId; + + protected String parentPath; + + protected final ShuttlePathEntryScopeV2026R0 scope; + + protected final boolean isDirectory; + + protected final boolean canMap; + + public Builder( + String id, + String name, + String path, + ShuttlePathEntryAccountScopeV2026R0 scope, + boolean isDirectory, + boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = new ShuttlePathEntryScopeV2026R0(scope); + this.isDirectory = isDirectory; + this.canMap = canMap; + } + + public Builder( + String id, + String name, + String path, + ShuttlePathEntrySharedSpaceScopeV2026R0 scope, + boolean isDirectory, + boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = new ShuttlePathEntryScopeV2026R0(scope); + this.isDirectory = isDirectory; + this.canMap = canMap; + } + + public Builder( + String id, + String name, + String path, + ShuttlePathEntryScopeV2026R0 scope, + boolean isDirectory, + boolean canMap) { + super(); + this.id = id; + this.name = name; + this.path = path; + this.scope = scope; + this.isDirectory = isDirectory; + this.canMap = canMap; + } + + public Builder type(ShuttlePathEntryV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + this.markNullableFieldAsSet("path_id"); + return this; + } + + public Builder parentPath(String parentPath) { + this.parentPath = parentPath; + this.markNullableFieldAsSet("parent_path"); + return this; + } + + public ShuttlePathEntryV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY); + } + return new ShuttlePathEntryV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0TypeField.java new file mode 100644 index 000000000..ef575d578 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathentryv2026r0/ShuttlePathEntryV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathentryv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathEntryV2026R0TypeField implements Valuable { + SHUTTLE_PATH_ENTRY("shuttle_path_entry"); + + private final String value; + + ShuttlePathEntryV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathEntryV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathEntryV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathEntryV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathEntryV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathEntryV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountinputv2026r0/ShuttlePathMappingAccountInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountinputv2026r0/ShuttlePathMappingAccountInputV2026R0.java new file mode 100644 index 000000000..554faffb6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountinputv2026r0/ShuttlePathMappingAccountInputV2026R0.java @@ -0,0 +1,90 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountinputv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import java.util.Objects; + +/** + * The account that owns an account-scoped path mapping location. Provide at least one of `id` or + * `email`. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingAccountInputV2026R0 extends SerializableObject { + + /** The platform-native identifier of the account. */ + protected String id; + + /** The email address of the account. */ + protected String email; + + public ShuttlePathMappingAccountInputV2026R0() { + super(); + } + + protected ShuttlePathMappingAccountInputV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.email = builder.email; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public String getEmail() { + return email; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingAccountInputV2026R0 casted = (ShuttlePathMappingAccountInputV2026R0) o; + return Objects.equals(id, casted.id) && Objects.equals(email, casted.email); + } + + @Override + public int hashCode() { + return Objects.hash(id, email); + } + + @Override + public String toString() { + return "ShuttlePathMappingAccountInputV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "email='" + + email + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected String id; + + protected String email; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder email(String email) { + this.email = email; + return this; + } + + public ShuttlePathMappingAccountInputV2026R0 build() { + return new ShuttlePathMappingAccountInputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0.java new file mode 100644 index 000000000..7ea53849b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0.java @@ -0,0 +1,178 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationinputv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountinputv2026r0.ShuttlePathMappingAccountInputV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** An account-scoped source location supplied when creating or updating a path mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingAccountLocationInputV2026R0 extends SerializableObject { + + /** The value will always be `account`. */ + @JsonDeserialize( + using = + ShuttlePathMappingAccountLocationInputV2026R0TypeField + .ShuttlePathMappingAccountLocationInputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingAccountLocationInputV2026R0TypeField + .ShuttlePathMappingAccountLocationInputV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The human-readable path relative to the account root. */ + protected final String path; + + /** An optional stable identifier of the location, when obtained from browsing. */ + @JsonProperty("path_id") + protected String pathId; + + protected final ShuttlePathMappingAccountInputV2026R0 account; + + /** + * Whether the location is a directory. When set, the destination must be the same kind of object. + */ + @JsonProperty("is_directory") + protected Boolean isDirectory; + + public ShuttlePathMappingAccountLocationInputV2026R0( + @JsonProperty("path") String path, + @JsonProperty("account") ShuttlePathMappingAccountInputV2026R0 account) { + super(); + this.path = path; + this.account = account; + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationInputV2026R0TypeField.ACCOUNT); + } + + protected ShuttlePathMappingAccountLocationInputV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.path = builder.path; + this.pathId = builder.pathId; + this.account = builder.account; + this.isDirectory = builder.isDirectory; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public ShuttlePathMappingAccountInputV2026R0 getAccount() { + return account; + } + + public Boolean getIsDirectory() { + return isDirectory; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingAccountLocationInputV2026R0 casted = + (ShuttlePathMappingAccountLocationInputV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(account, casted.account) + && Objects.equals(isDirectory, casted.isDirectory); + } + + @Override + public int hashCode() { + return Objects.hash(type, path, pathId, account, isDirectory); + } + + @Override + public String toString() { + return "ShuttlePathMappingAccountLocationInputV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "account='" + + account + + '\'' + + ", " + + "isDirectory='" + + isDirectory + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String path; + + protected String pathId; + + protected final ShuttlePathMappingAccountInputV2026R0 account; + + protected Boolean isDirectory; + + public Builder(String path, ShuttlePathMappingAccountInputV2026R0 account) { + super(); + this.path = path; + this.account = account; + } + + public Builder type(ShuttlePathMappingAccountLocationInputV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + return this; + } + + public Builder isDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + return this; + } + + public ShuttlePathMappingAccountLocationInputV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationInputV2026R0TypeField.ACCOUNT); + } + return new ShuttlePathMappingAccountLocationInputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0TypeField.java new file mode 100644 index 000000000..12bf3b1e4 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationinputv2026r0/ShuttlePathMappingAccountLocationInputV2026R0TypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationinputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingAccountLocationInputV2026R0TypeField implements Valuable { + ACCOUNT("account"); + + private final String value; + + ShuttlePathMappingAccountLocationInputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingAccountLocationInputV2026R0TypeFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public ShuttlePathMappingAccountLocationInputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingAccountLocationInputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingAccountLocationInputV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathMappingAccountLocationInputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0.java new file mode 100644 index 000000000..32223604b --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0.java @@ -0,0 +1,157 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationtargetinputv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountinputv2026r0.ShuttlePathMappingAccountInputV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** An account-scoped destination location supplied when creating or updating a path mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingAccountLocationTargetInputV2026R0 extends SerializableObject { + + /** The value will always be `account`. */ + @JsonDeserialize( + using = + ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField + .ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField + .ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The human-readable path relative to the account root. */ + protected final String path; + + /** An optional stable identifier of the location, when obtained from browsing. */ + @JsonProperty("path_id") + protected String pathId; + + protected final ShuttlePathMappingAccountInputV2026R0 account; + + public ShuttlePathMappingAccountLocationTargetInputV2026R0( + @JsonProperty("path") String path, + @JsonProperty("account") ShuttlePathMappingAccountInputV2026R0 account) { + super(); + this.path = path; + this.account = account; + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.ACCOUNT); + } + + protected ShuttlePathMappingAccountLocationTargetInputV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.path = builder.path; + this.pathId = builder.pathId; + this.account = builder.account; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public ShuttlePathMappingAccountInputV2026R0 getAccount() { + return account; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingAccountLocationTargetInputV2026R0 casted = + (ShuttlePathMappingAccountLocationTargetInputV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(account, casted.account); + } + + @Override + public int hashCode() { + return Objects.hash(type, path, pathId, account); + } + + @Override + public String toString() { + return "ShuttlePathMappingAccountLocationTargetInputV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "account='" + + account + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String path; + + protected String pathId; + + protected final ShuttlePathMappingAccountInputV2026R0 account; + + public Builder(String path, ShuttlePathMappingAccountInputV2026R0 account) { + super(); + this.path = path; + this.account = account; + } + + public Builder type(ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField type) { + this.type = + new EnumWrapper(type); + return this; + } + + public Builder type( + EnumWrapper type) { + this.type = type; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + return this; + } + + public ShuttlePathMappingAccountLocationTargetInputV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.ACCOUNT); + } + return new ShuttlePathMappingAccountLocationTargetInputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.java new file mode 100644 index 000000000..e44d232a4 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationtargetinputv2026r0/ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationtargetinputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField implements Valuable { + ACCOUNT("account"); + + private final String value; + + ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public ShuttlePathMappingAccountLocationTargetInputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0.java new file mode 100644 index 000000000..cf37570ec --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0.java @@ -0,0 +1,181 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountv2026r0.ShuttlePathMappingAccountV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A path mapping location scoped to a user or service account. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingAccountLocationV2026R0 extends SerializableObject { + + /** The value will always be `account`. */ + @JsonDeserialize( + using = + ShuttlePathMappingAccountLocationV2026R0TypeField + .ShuttlePathMappingAccountLocationV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingAccountLocationV2026R0TypeField + .ShuttlePathMappingAccountLocationV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The human-readable path relative to the account root. */ + protected final String path; + + /** The stable identifier of the location. `null` when the system does not provide one. */ + @JsonProperty("path_id") + @Nullable + protected String pathId; + + protected ShuttlePathMappingAccountV2026R0 account; + + /** Whether the location is a directory. `null` when unknown. */ + @JsonProperty("is_directory") + @Nullable + protected Boolean isDirectory; + + public ShuttlePathMappingAccountLocationV2026R0(@JsonProperty("path") String path) { + super(); + this.path = path; + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationV2026R0TypeField.ACCOUNT); + } + + protected ShuttlePathMappingAccountLocationV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.path = builder.path; + this.pathId = builder.pathId; + this.account = builder.account; + this.isDirectory = builder.isDirectory; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public ShuttlePathMappingAccountV2026R0 getAccount() { + return account; + } + + public Boolean getIsDirectory() { + return isDirectory; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingAccountLocationV2026R0 casted = (ShuttlePathMappingAccountLocationV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(account, casted.account) + && Objects.equals(isDirectory, casted.isDirectory); + } + + @Override + public int hashCode() { + return Objects.hash(type, path, pathId, account, isDirectory); + } + + @Override + public String toString() { + return "ShuttlePathMappingAccountLocationV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "account='" + + account + + '\'' + + ", " + + "isDirectory='" + + isDirectory + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected final String path; + + protected String pathId; + + protected ShuttlePathMappingAccountV2026R0 account; + + protected Boolean isDirectory; + + public Builder(String path) { + super(); + this.path = path; + } + + public Builder type(ShuttlePathMappingAccountLocationV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + this.markNullableFieldAsSet("path_id"); + return this; + } + + public Builder account(ShuttlePathMappingAccountV2026R0 account) { + this.account = account; + return this; + } + + public Builder isDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + this.markNullableFieldAsSet("is_directory"); + return this; + } + + public ShuttlePathMappingAccountLocationV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingAccountLocationV2026R0TypeField.ACCOUNT); + } + return new ShuttlePathMappingAccountLocationV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0TypeField.java new file mode 100644 index 000000000..57ba6205c --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountlocationv2026r0/ShuttlePathMappingAccountLocationV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingAccountLocationV2026R0TypeField implements Valuable { + ACCOUNT("account"); + + private final String value; + + ShuttlePathMappingAccountLocationV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingAccountLocationV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathMappingAccountLocationV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingAccountLocationV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingAccountLocationV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathMappingAccountLocationV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountv2026r0/ShuttlePathMappingAccountV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountv2026r0/ShuttlePathMappingAccountV2026R0.java new file mode 100644 index 000000000..65ab96b63 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingaccountv2026r0/ShuttlePathMappingAccountV2026R0.java @@ -0,0 +1,112 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import java.util.Objects; + +/** The account that owns an account-scoped path mapping location. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingAccountV2026R0 extends SerializableObject { + + /** The platform-native identifier of the account. `null` when the system does not provide one. */ + @Nullable protected String id; + + /** The email address of the account. `null` when unknown. */ + @Nullable protected String email; + + /** The display name of the account. `null` when unknown. */ + @Nullable protected String name; + + public ShuttlePathMappingAccountV2026R0() { + super(); + } + + protected ShuttlePathMappingAccountV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.email = builder.email; + this.name = builder.name; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public String getEmail() { + return email; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingAccountV2026R0 casted = (ShuttlePathMappingAccountV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(email, casted.email) + && Objects.equals(name, casted.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, email, name); + } + + @Override + public String toString() { + return "ShuttlePathMappingAccountV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "email='" + + email + + '\'' + + ", " + + "name='" + + name + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected String id; + + protected String email; + + protected String name; + + public Builder id(String id) { + this.id = id; + this.markNullableFieldAsSet("id"); + return this; + } + + public Builder email(String email) { + this.email = email; + this.markNullableFieldAsSet("email"); + return this; + } + + public Builder name(String name) { + this.name = name; + this.markNullableFieldAsSet("name"); + return this; + } + + public ShuttlePathMappingAccountV2026R0 build() { + return new ShuttlePathMappingAccountV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingcreaterequestv2026r0/ShuttlePathMappingCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingcreaterequestv2026r0/ShuttlePathMappingCreateRequestV2026R0.java new file mode 100644 index 000000000..388e24472 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingcreaterequestv2026r0/ShuttlePathMappingCreateRequestV2026R0.java @@ -0,0 +1,174 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationinputv2026r0.ShuttlePathMappingAccountLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationtargetinputv2026r0.ShuttlePathMappingAccountLocationTargetInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappinglocationinputv2026r0.ShuttlePathMappingLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationinputv2026r0.ShuttlePathMappingSharedSpaceLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationtargetinputv2026r0.ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingtargetlocationinputv2026r0.ShuttlePathMappingTargetLocationInputV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The request body used to create a new shuttle path mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle job this mapping belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** Whether this source path should be skipped during the migration. Defaults to `false`. */ + @JsonProperty("is_path_skipped") + protected Boolean isPathSkipped; + + protected final ShuttlePathMappingLocationInputV2026R0 source; + + /** + * The destination location to migrate to. Omit or set to `null` when the source path is skipped. + */ + protected ShuttlePathMappingTargetLocationInputV2026R0 target; + + public ShuttlePathMappingCreateRequestV2026R0( + String jobId, ShuttlePathMappingAccountLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + } + + public ShuttlePathMappingCreateRequestV2026R0( + String jobId, ShuttlePathMappingSharedSpaceLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + } + + public ShuttlePathMappingCreateRequestV2026R0( + @JsonProperty("job_id") String jobId, + @JsonProperty("source") ShuttlePathMappingLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = source; + } + + protected ShuttlePathMappingCreateRequestV2026R0(Builder builder) { + super(); + this.jobId = builder.jobId; + this.isPathSkipped = builder.isPathSkipped; + this.source = builder.source; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getJobId() { + return jobId; + } + + public Boolean getIsPathSkipped() { + return isPathSkipped; + } + + public ShuttlePathMappingLocationInputV2026R0 getSource() { + return source; + } + + public ShuttlePathMappingTargetLocationInputV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingCreateRequestV2026R0 casted = (ShuttlePathMappingCreateRequestV2026R0) o; + return Objects.equals(jobId, casted.jobId) + && Objects.equals(isPathSkipped, casted.isPathSkipped) + && Objects.equals(source, casted.source) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, isPathSkipped, source, target); + } + + @Override + public String toString() { + return "ShuttlePathMappingCreateRequestV2026R0{" + + "jobId='" + + jobId + + '\'' + + ", " + + "isPathSkipped='" + + isPathSkipped + + '\'' + + ", " + + "source='" + + source + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String jobId; + + protected Boolean isPathSkipped; + + protected final ShuttlePathMappingLocationInputV2026R0 source; + + protected ShuttlePathMappingTargetLocationInputV2026R0 target; + + public Builder(String jobId, ShuttlePathMappingAccountLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + } + + public Builder(String jobId, ShuttlePathMappingSharedSpaceLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + } + + public Builder(String jobId, ShuttlePathMappingLocationInputV2026R0 source) { + super(); + this.jobId = jobId; + this.source = source; + } + + public Builder isPathSkipped(Boolean isPathSkipped) { + this.isPathSkipped = isPathSkipped; + return this; + } + + public Builder target(ShuttlePathMappingAccountLocationTargetInputV2026R0 target) { + this.target = new ShuttlePathMappingTargetLocationInputV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 target) { + this.target = new ShuttlePathMappingTargetLocationInputV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingTargetLocationInputV2026R0 target) { + this.target = target; + return this; + } + + public ShuttlePathMappingCreateRequestV2026R0 build() { + return new ShuttlePathMappingCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingimportcreaterequestv2026r0/ShuttlePathMappingImportCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingimportcreaterequestv2026r0/ShuttlePathMappingImportCreateRequestV2026R0.java new file mode 100644 index 000000000..a15bc91a7 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingimportcreaterequestv2026r0/ShuttlePathMappingImportCreateRequestV2026R0.java @@ -0,0 +1,71 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingimportcreaterequestv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The request body used to import a shuttle job's path mappings from a spreadsheet already stored + * in Box. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingImportCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle job whose path mappings are replaced. */ + @JsonProperty("job_id") + protected final String jobId; + + /** + * The unique identifier of the Box file holding the mapping workbook. The file is read as the + * calling user, so it must live somewhere that user can download from. + */ + @JsonProperty("file_id") + protected final String fileId; + + public ShuttlePathMappingImportCreateRequestV2026R0( + @JsonProperty("job_id") String jobId, @JsonProperty("file_id") String fileId) { + super(); + this.jobId = jobId; + this.fileId = fileId; + } + + public String getJobId() { + return jobId; + } + + public String getFileId() { + return fileId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingImportCreateRequestV2026R0 casted = + (ShuttlePathMappingImportCreateRequestV2026R0) o; + return Objects.equals(jobId, casted.jobId) && Objects.equals(fileId, casted.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, fileId); + } + + @Override + public String toString() { + return "ShuttlePathMappingImportCreateRequestV2026R0{" + + "jobId='" + + jobId + + '\'' + + ", " + + "fileId='" + + fileId + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationinputv2026r0/ShuttlePathMappingLocationInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationinputv2026r0/ShuttlePathMappingLocationInputV2026R0.java new file mode 100644 index 000000000..25ed412a5 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationinputv2026r0/ShuttlePathMappingLocationInputV2026R0.java @@ -0,0 +1,117 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappinglocationinputv2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationinputv2026r0.ShuttlePathMappingAccountLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationinputv2026r0.ShuttlePathMappingSharedSpaceLocationInputV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = + ShuttlePathMappingLocationInputV2026R0.ShuttlePathMappingLocationInputV2026R0Deserializer + .class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class ShuttlePathMappingLocationInputV2026R0 + extends OneOfTwo< + ShuttlePathMappingAccountLocationInputV2026R0, + ShuttlePathMappingSharedSpaceLocationInputV2026R0> { + + protected final String type; + + protected final String path; + + protected final String pathId; + + protected final Boolean isDirectory; + + public ShuttlePathMappingLocationInputV2026R0( + ShuttlePathMappingAccountLocationInputV2026R0 shuttlePathMappingAccountLocationInputV2026R0) { + super(shuttlePathMappingAccountLocationInputV2026R0, null); + this.type = + EnumWrapper.convertToString(shuttlePathMappingAccountLocationInputV2026R0.getType()); + this.path = shuttlePathMappingAccountLocationInputV2026R0.getPath(); + this.pathId = shuttlePathMappingAccountLocationInputV2026R0.getPathId(); + this.isDirectory = shuttlePathMappingAccountLocationInputV2026R0.getIsDirectory(); + } + + public ShuttlePathMappingLocationInputV2026R0( + ShuttlePathMappingSharedSpaceLocationInputV2026R0 + shuttlePathMappingSharedSpaceLocationInputV2026R0) { + super(null, shuttlePathMappingSharedSpaceLocationInputV2026R0); + this.type = + EnumWrapper.convertToString(shuttlePathMappingSharedSpaceLocationInputV2026R0.getType()); + this.path = shuttlePathMappingSharedSpaceLocationInputV2026R0.getPath(); + this.pathId = shuttlePathMappingSharedSpaceLocationInputV2026R0.getPathId(); + this.isDirectory = shuttlePathMappingSharedSpaceLocationInputV2026R0.getIsDirectory(); + } + + public boolean isShuttlePathMappingAccountLocationInputV2026R0() { + return value0 != null; + } + + public ShuttlePathMappingAccountLocationInputV2026R0 + getShuttlePathMappingAccountLocationInputV2026R0() { + return value0; + } + + public boolean isShuttlePathMappingSharedSpaceLocationInputV2026R0() { + return value1 != null; + } + + public ShuttlePathMappingSharedSpaceLocationInputV2026R0 + getShuttlePathMappingSharedSpaceLocationInputV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public boolean getIsDirectory() { + return isDirectory; + } + + static class ShuttlePathMappingLocationInputV2026R0Deserializer + extends JsonDeserializer { + + public ShuttlePathMappingLocationInputV2026R0Deserializer() { + super(); + } + + @Override + public ShuttlePathMappingLocationInputV2026R0 deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "account": + return new ShuttlePathMappingLocationInputV2026R0( + JsonManager.deserialize(node, ShuttlePathMappingAccountLocationInputV2026R0.class)); + case "shared_space": + return new ShuttlePathMappingLocationInputV2026R0( + JsonManager.deserialize( + node, ShuttlePathMappingSharedSpaceLocationInputV2026R0.class)); + } + } + throw new JsonMappingException( + jp, "Unable to deserialize ShuttlePathMappingLocationInputV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationv2026r0/ShuttlePathMappingLocationV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationv2026r0/ShuttlePathMappingLocationV2026R0.java new file mode 100644 index 000000000..ba96cdfb6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappinglocationv2026r0/ShuttlePathMappingLocationV2026R0.java @@ -0,0 +1,108 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappinglocationv2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationv2026r0.ShuttlePathMappingAccountLocationV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationv2026r0.ShuttlePathMappingSharedSpaceLocationV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = ShuttlePathMappingLocationV2026R0.ShuttlePathMappingLocationV2026R0Deserializer.class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class ShuttlePathMappingLocationV2026R0 + extends OneOfTwo< + ShuttlePathMappingAccountLocationV2026R0, ShuttlePathMappingSharedSpaceLocationV2026R0> { + + protected final String type; + + protected final String path; + + protected final String pathId; + + protected final Boolean isDirectory; + + public ShuttlePathMappingLocationV2026R0( + ShuttlePathMappingAccountLocationV2026R0 shuttlePathMappingAccountLocationV2026R0) { + super(shuttlePathMappingAccountLocationV2026R0, null); + this.type = EnumWrapper.convertToString(shuttlePathMappingAccountLocationV2026R0.getType()); + this.path = shuttlePathMappingAccountLocationV2026R0.getPath(); + this.pathId = shuttlePathMappingAccountLocationV2026R0.getPathId(); + this.isDirectory = shuttlePathMappingAccountLocationV2026R0.getIsDirectory(); + } + + public ShuttlePathMappingLocationV2026R0( + ShuttlePathMappingSharedSpaceLocationV2026R0 shuttlePathMappingSharedSpaceLocationV2026R0) { + super(null, shuttlePathMappingSharedSpaceLocationV2026R0); + this.type = EnumWrapper.convertToString(shuttlePathMappingSharedSpaceLocationV2026R0.getType()); + this.path = shuttlePathMappingSharedSpaceLocationV2026R0.getPath(); + this.pathId = shuttlePathMappingSharedSpaceLocationV2026R0.getPathId(); + this.isDirectory = shuttlePathMappingSharedSpaceLocationV2026R0.getIsDirectory(); + } + + public boolean isShuttlePathMappingAccountLocationV2026R0() { + return value0 != null; + } + + public ShuttlePathMappingAccountLocationV2026R0 getShuttlePathMappingAccountLocationV2026R0() { + return value0; + } + + public boolean isShuttlePathMappingSharedSpaceLocationV2026R0() { + return value1 != null; + } + + public ShuttlePathMappingSharedSpaceLocationV2026R0 + getShuttlePathMappingSharedSpaceLocationV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public boolean getIsDirectory() { + return isDirectory; + } + + static class ShuttlePathMappingLocationV2026R0Deserializer + extends JsonDeserializer { + + public ShuttlePathMappingLocationV2026R0Deserializer() { + super(); + } + + @Override + public ShuttlePathMappingLocationV2026R0 deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "account": + return new ShuttlePathMappingLocationV2026R0( + JsonManager.deserialize(node, ShuttlePathMappingAccountLocationV2026R0.class)); + case "shared_space": + return new ShuttlePathMappingLocationV2026R0( + JsonManager.deserialize(node, ShuttlePathMappingSharedSpaceLocationV2026R0.class)); + } + } + throw new JsonMappingException(jp, "Unable to deserialize ShuttlePathMappingLocationV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0.java new file mode 100644 index 000000000..f6b454734 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0.java @@ -0,0 +1,180 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationinputv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A shared-container source location supplied when creating or updating a path mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingSharedSpaceLocationInputV2026R0 extends SerializableObject { + + /** The value will always be `shared_space`. */ + @JsonDeserialize( + using = + ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The display name of the shared container. Required for systems with multiple containers. */ + protected String space; + + /** The human-readable path relative to the shared container. */ + protected final String path; + + /** An optional stable identifier of the location, when obtained from browsing. */ + @JsonProperty("path_id") + protected String pathId; + + /** + * Whether the location is a directory. When set, the destination must be the same kind of object. + */ + @JsonProperty("is_directory") + protected Boolean isDirectory; + + public ShuttlePathMappingSharedSpaceLocationInputV2026R0(@JsonProperty("path") String path) { + super(); + this.path = path; + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.SHARED_SPACE); + } + + protected ShuttlePathMappingSharedSpaceLocationInputV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.space = builder.space; + this.path = builder.path; + this.pathId = builder.pathId; + this.isDirectory = builder.isDirectory; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getSpace() { + return space; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public Boolean getIsDirectory() { + return isDirectory; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingSharedSpaceLocationInputV2026R0 casted = + (ShuttlePathMappingSharedSpaceLocationInputV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(space, casted.space) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(isDirectory, casted.isDirectory); + } + + @Override + public int hashCode() { + return Objects.hash(type, space, path, pathId, isDirectory); + } + + @Override + public String toString() { + return "ShuttlePathMappingSharedSpaceLocationInputV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "space='" + + space + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "isDirectory='" + + isDirectory + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected String space; + + protected final String path; + + protected String pathId; + + protected Boolean isDirectory; + + public Builder(String path) { + super(); + this.path = path; + } + + public Builder type(ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type( + EnumWrapper type) { + this.type = type; + return this; + } + + public Builder space(String space) { + this.space = space; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + return this; + } + + public Builder isDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + return this; + } + + public ShuttlePathMappingSharedSpaceLocationInputV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.SHARED_SPACE); + } + return new ShuttlePathMappingSharedSpaceLocationInputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.java new file mode 100644 index 000000000..36830c696 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationinputv2026r0/ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.java @@ -0,0 +1,67 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationinputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField implements Valuable { + SHARED_SPACE("shared_space"); + + private final String value; + + ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0.java new file mode 100644 index 000000000..0be175a6a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0.java @@ -0,0 +1,159 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationtargetinputv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A shared-container destination location supplied when creating or updating a path mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 extends SerializableObject { + + /** The value will always be `shared_space`. */ + @JsonDeserialize( + using = + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The display name of the shared container. Required for systems with multiple containers. */ + protected String space; + + /** The human-readable path relative to the shared container. */ + protected final String path; + + /** An optional stable identifier of the location, when obtained from browsing. */ + @JsonProperty("path_id") + protected String pathId; + + public ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0( + @JsonProperty("path") String path) { + super(); + this.path = path; + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.SHARED_SPACE); + } + + protected ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.space = builder.space; + this.path = builder.path; + this.pathId = builder.pathId; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getSpace() { + return space; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 casted = + (ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(space, casted.space) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId); + } + + @Override + public int hashCode() { + return Objects.hash(type, space, path, pathId); + } + + @Override + public String toString() { + return "ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "space='" + + space + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected String space; + + protected final String path; + + protected String pathId; + + public Builder(String path) { + super(); + this.path = path; + } + + public Builder type(ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField type) { + this.type = + new EnumWrapper(type); + return this; + } + + public Builder type( + EnumWrapper type) { + this.type = type; + return this; + } + + public Builder space(String space) { + this.space = space; + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + return this; + } + + public ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.SHARED_SPACE); + } + return new ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.java new file mode 100644 index 000000000..61d0890a0 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationtargetinputv2026r0/ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.java @@ -0,0 +1,69 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationtargetinputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField implements Valuable { + SHARED_SPACE("shared_space"); + + private final String value; + + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldDeserializer + extends JsonDeserializer< + EnumWrapper> { + + public ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper + deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse( + new EnumWrapper( + value)); + } + } + + public static class ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldSerializer + extends JsonSerializer< + EnumWrapper> { + + public ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0.java new file mode 100644 index 000000000..b55c5f27d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0.java @@ -0,0 +1,189 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A path mapping location scoped to a shared container such as a site, team drive, bucket, or file + * share. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingSharedSpaceLocationV2026R0 extends SerializableObject { + + /** The value will always be `shared_space`. */ + @JsonDeserialize( + using = + ShuttlePathMappingSharedSpaceLocationV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttlePathMappingSharedSpaceLocationV2026R0TypeField + .ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** + * The display name of the shared container. `null` when the system has a single implicit + * container. + */ + @Nullable protected String space; + + /** The human-readable path relative to the shared container. */ + protected final String path; + + /** The stable identifier of the location. `null` when the system does not provide one. */ + @JsonProperty("path_id") + @Nullable + protected String pathId; + + /** Whether the location is a directory. `null` when unknown. */ + @JsonProperty("is_directory") + @Nullable + protected Boolean isDirectory; + + public ShuttlePathMappingSharedSpaceLocationV2026R0(@JsonProperty("path") String path) { + super(); + this.path = path; + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.SHARED_SPACE); + } + + protected ShuttlePathMappingSharedSpaceLocationV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.space = builder.space; + this.path = builder.path; + this.pathId = builder.pathId; + this.isDirectory = builder.isDirectory; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getSpace() { + return space; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + public Boolean getIsDirectory() { + return isDirectory; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingSharedSpaceLocationV2026R0 casted = + (ShuttlePathMappingSharedSpaceLocationV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(space, casted.space) + && Objects.equals(path, casted.path) + && Objects.equals(pathId, casted.pathId) + && Objects.equals(isDirectory, casted.isDirectory); + } + + @Override + public int hashCode() { + return Objects.hash(type, space, path, pathId, isDirectory); + } + + @Override + public String toString() { + return "ShuttlePathMappingSharedSpaceLocationV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "space='" + + space + + '\'' + + ", " + + "path='" + + path + + '\'' + + ", " + + "pathId='" + + pathId + + '\'' + + ", " + + "isDirectory='" + + isDirectory + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected EnumWrapper type; + + protected String space; + + protected final String path; + + protected String pathId; + + protected Boolean isDirectory; + + public Builder(String path) { + super(); + this.path = path; + } + + public Builder type(ShuttlePathMappingSharedSpaceLocationV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder space(String space) { + this.space = space; + this.markNullableFieldAsSet("space"); + return this; + } + + public Builder pathId(String pathId) { + this.pathId = pathId; + this.markNullableFieldAsSet("path_id"); + return this; + } + + public Builder isDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + this.markNullableFieldAsSet("is_directory"); + return this; + } + + public ShuttlePathMappingSharedSpaceLocationV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.SHARED_SPACE); + } + return new ShuttlePathMappingSharedSpaceLocationV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.java new file mode 100644 index 000000000..3486117a2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsharedspacelocationv2026r0/ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingSharedSpaceLocationV2026R0TypeField implements Valuable { + SHARED_SPACE("shared_space"); + + private final String value; + + ShuttlePathMappingSharedSpaceLocationV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathMappingSharedSpaceLocationV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsv2026r0/ShuttlePathMappingsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsv2026r0/ShuttlePathMappingsV2026R0.java new file mode 100644 index 000000000..770b827e3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingsv2026r0/ShuttlePathMappingsV2026R0.java @@ -0,0 +1,143 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingv2026r0.ShuttlePathMappingV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle path mappings. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingsV2026R0 extends SerializableObject { + + /** A list of shuttle path mappings. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttlePathMappingsV2026R0( + @JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttlePathMappingsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingsV2026R0 casted = (ShuttlePathMappingsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttlePathMappingsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttlePathMappingsV2026R0 build() { + return new ShuttlePathMappingsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingtargetlocationinputv2026r0/ShuttlePathMappingTargetLocationInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingtargetlocationinputv2026r0/ShuttlePathMappingTargetLocationInputV2026R0.java new file mode 100644 index 000000000..f786a238f --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingtargetlocationinputv2026r0/ShuttlePathMappingTargetLocationInputV2026R0.java @@ -0,0 +1,112 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingtargetlocationinputv2026r0; + +import com.box.sdkgen.internal.OneOfTwo; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationtargetinputv2026r0.ShuttlePathMappingAccountLocationTargetInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationtargetinputv2026r0.ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.JsonManager; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; + +@JsonDeserialize( + using = + ShuttlePathMappingTargetLocationInputV2026R0 + .ShuttlePathMappingTargetLocationInputV2026R0Deserializer.class) +@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class) +public class ShuttlePathMappingTargetLocationInputV2026R0 + extends OneOfTwo< + ShuttlePathMappingAccountLocationTargetInputV2026R0, + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0> { + + protected final String type; + + protected final String path; + + protected final String pathId; + + public ShuttlePathMappingTargetLocationInputV2026R0( + ShuttlePathMappingAccountLocationTargetInputV2026R0 + shuttlePathMappingAccountLocationTargetInputV2026R0) { + super(shuttlePathMappingAccountLocationTargetInputV2026R0, null); + this.type = + EnumWrapper.convertToString(shuttlePathMappingAccountLocationTargetInputV2026R0.getType()); + this.path = shuttlePathMappingAccountLocationTargetInputV2026R0.getPath(); + this.pathId = shuttlePathMappingAccountLocationTargetInputV2026R0.getPathId(); + } + + public ShuttlePathMappingTargetLocationInputV2026R0( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 + shuttlePathMappingSharedSpaceLocationTargetInputV2026R0) { + super(null, shuttlePathMappingSharedSpaceLocationTargetInputV2026R0); + this.type = + EnumWrapper.convertToString( + shuttlePathMappingSharedSpaceLocationTargetInputV2026R0.getType()); + this.path = shuttlePathMappingSharedSpaceLocationTargetInputV2026R0.getPath(); + this.pathId = shuttlePathMappingSharedSpaceLocationTargetInputV2026R0.getPathId(); + } + + public boolean isShuttlePathMappingAccountLocationTargetInputV2026R0() { + return value0 != null; + } + + public ShuttlePathMappingAccountLocationTargetInputV2026R0 + getShuttlePathMappingAccountLocationTargetInputV2026R0() { + return value0; + } + + public boolean isShuttlePathMappingSharedSpaceLocationTargetInputV2026R0() { + return value1 != null; + } + + public ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 + getShuttlePathMappingSharedSpaceLocationTargetInputV2026R0() { + return value1; + } + + public String getType() { + return type; + } + + public String getPath() { + return path; + } + + public String getPathId() { + return pathId; + } + + static class ShuttlePathMappingTargetLocationInputV2026R0Deserializer + extends JsonDeserializer { + + public ShuttlePathMappingTargetLocationInputV2026R0Deserializer() { + super(); + } + + @Override + public ShuttlePathMappingTargetLocationInputV2026R0 deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException { + JsonNode node = JsonManager.jsonToSerializedData(jp); + JsonNode discriminant0 = node.get("type"); + if (!(discriminant0 == null)) { + switch (discriminant0.asText()) { + case "account": + return new ShuttlePathMappingTargetLocationInputV2026R0( + JsonManager.deserialize( + node, ShuttlePathMappingAccountLocationTargetInputV2026R0.class)); + case "shared_space": + return new ShuttlePathMappingTargetLocationInputV2026R0( + JsonManager.deserialize( + node, ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0.class)); + } + } + throw new JsonMappingException( + jp, "Unable to deserialize ShuttlePathMappingTargetLocationInputV2026R0"); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingupdaterequestv2026r0/ShuttlePathMappingUpdateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingupdaterequestv2026r0/ShuttlePathMappingUpdateRequestV2026R0.java new file mode 100644 index 000000000..ea530e35d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingupdaterequestv2026r0/ShuttlePathMappingUpdateRequestV2026R0.java @@ -0,0 +1,141 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingupdaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationinputv2026r0.ShuttlePathMappingAccountLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationtargetinputv2026r0.ShuttlePathMappingAccountLocationTargetInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappinglocationinputv2026r0.ShuttlePathMappingLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationinputv2026r0.ShuttlePathMappingSharedSpaceLocationInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationtargetinputv2026r0.ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingtargetlocationinputv2026r0.ShuttlePathMappingTargetLocationInputV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The request body used to update an existing shuttle path mapping. Only the fields supplied in the + * request body are changed. `job_id`, `id`, and `type` are immutable. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingUpdateRequestV2026R0 extends SerializableObject { + + /** Whether this source path should be skipped during the migration. */ + @JsonProperty("is_path_skipped") + protected Boolean isPathSkipped; + + protected ShuttlePathMappingLocationInputV2026R0 source; + + /** + * The destination location to migrate to. Set to `null` to clear the destination, for example + * when skipping the source path. + */ + protected ShuttlePathMappingTargetLocationInputV2026R0 target; + + public ShuttlePathMappingUpdateRequestV2026R0() { + super(); + } + + protected ShuttlePathMappingUpdateRequestV2026R0(Builder builder) { + super(); + this.isPathSkipped = builder.isPathSkipped; + this.source = builder.source; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Boolean getIsPathSkipped() { + return isPathSkipped; + } + + public ShuttlePathMappingLocationInputV2026R0 getSource() { + return source; + } + + public ShuttlePathMappingTargetLocationInputV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingUpdateRequestV2026R0 casted = (ShuttlePathMappingUpdateRequestV2026R0) o; + return Objects.equals(isPathSkipped, casted.isPathSkipped) + && Objects.equals(source, casted.source) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash(isPathSkipped, source, target); + } + + @Override + public String toString() { + return "ShuttlePathMappingUpdateRequestV2026R0{" + + "isPathSkipped='" + + isPathSkipped + + '\'' + + ", " + + "source='" + + source + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Boolean isPathSkipped; + + protected ShuttlePathMappingLocationInputV2026R0 source; + + protected ShuttlePathMappingTargetLocationInputV2026R0 target; + + public Builder isPathSkipped(Boolean isPathSkipped) { + this.isPathSkipped = isPathSkipped; + return this; + } + + public Builder source(ShuttlePathMappingAccountLocationInputV2026R0 source) { + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + return this; + } + + public Builder source(ShuttlePathMappingSharedSpaceLocationInputV2026R0 source) { + this.source = new ShuttlePathMappingLocationInputV2026R0(source); + return this; + } + + public Builder source(ShuttlePathMappingLocationInputV2026R0 source) { + this.source = source; + return this; + } + + public Builder target(ShuttlePathMappingAccountLocationTargetInputV2026R0 target) { + this.target = new ShuttlePathMappingTargetLocationInputV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0 target) { + this.target = new ShuttlePathMappingTargetLocationInputV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingTargetLocationInputV2026R0 target) { + this.target = target; + return this; + } + + public ShuttlePathMappingUpdateRequestV2026R0 build() { + return new ShuttlePathMappingUpdateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0.java new file mode 100644 index 000000000..2e7bdfef3 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0.java @@ -0,0 +1,261 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingaccountlocationv2026r0.ShuttlePathMappingAccountLocationV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappinglocationv2026r0.ShuttlePathMappingLocationV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttlepathmappingsharedspacelocationv2026r0.ShuttlePathMappingSharedSpaceLocationV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A standard representation of a shuttle path mapping. A path mapping connects a source location on + * the migrated system to a destination in Box, or marks the source path as skipped. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttlePathMappingV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle path mapping. */ + protected final String id; + + /** The value will always be `shuttle_path_mapping`. */ + @JsonDeserialize( + using = + ShuttlePathMappingV2026R0TypeField.ShuttlePathMappingV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttlePathMappingV2026R0TypeField.ShuttlePathMappingV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this mapping belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** Whether this source path is skipped during the migration. */ + @JsonProperty("is_path_skipped") + protected final boolean isPathSkipped; + + protected final ShuttlePathMappingLocationV2026R0 source; + + /** + * The destination location. `null` when the source path is skipped or the job has no destination, + * such as an analysis job. + */ + protected ShuttlePathMappingLocationV2026R0 target; + + public ShuttlePathMappingV2026R0( + String id, + String jobId, + boolean isPathSkipped, + ShuttlePathMappingAccountLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = new ShuttlePathMappingLocationV2026R0(source); + this.type = + new EnumWrapper( + ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING); + } + + public ShuttlePathMappingV2026R0( + String id, + String jobId, + boolean isPathSkipped, + ShuttlePathMappingSharedSpaceLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = new ShuttlePathMappingLocationV2026R0(source); + this.type = + new EnumWrapper( + ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING); + } + + public ShuttlePathMappingV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("is_path_skipped") boolean isPathSkipped, + @JsonProperty("source") ShuttlePathMappingLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = source; + this.type = + new EnumWrapper( + ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING); + } + + protected ShuttlePathMappingV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.isPathSkipped = builder.isPathSkipped; + this.source = builder.source; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public boolean getIsPathSkipped() { + return isPathSkipped; + } + + public ShuttlePathMappingLocationV2026R0 getSource() { + return source; + } + + public ShuttlePathMappingLocationV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttlePathMappingV2026R0 casted = (ShuttlePathMappingV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(isPathSkipped, casted.isPathSkipped) + && Objects.equals(source, casted.source) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, jobId, isPathSkipped, source, target); + } + + @Override + public String toString() { + return "ShuttlePathMappingV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "isPathSkipped='" + + isPathSkipped + + '\'' + + ", " + + "source='" + + source + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected final boolean isPathSkipped; + + protected final ShuttlePathMappingLocationV2026R0 source; + + protected ShuttlePathMappingLocationV2026R0 target; + + public Builder( + String id, + String jobId, + boolean isPathSkipped, + ShuttlePathMappingAccountLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = new ShuttlePathMappingLocationV2026R0(source); + } + + public Builder( + String id, + String jobId, + boolean isPathSkipped, + ShuttlePathMappingSharedSpaceLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = new ShuttlePathMappingLocationV2026R0(source); + } + + public Builder( + String id, String jobId, boolean isPathSkipped, ShuttlePathMappingLocationV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isPathSkipped = isPathSkipped; + this.source = source; + } + + public Builder type(ShuttlePathMappingV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder target(ShuttlePathMappingAccountLocationV2026R0 target) { + this.target = new ShuttlePathMappingLocationV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingSharedSpaceLocationV2026R0 target) { + this.target = new ShuttlePathMappingLocationV2026R0(target); + return this; + } + + public Builder target(ShuttlePathMappingLocationV2026R0 target) { + this.target = target; + return this; + } + + public ShuttlePathMappingV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING); + } + return new ShuttlePathMappingV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0TypeField.java new file mode 100644 index 000000000..f8f5b04af --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlepathmappingv2026r0/ShuttlePathMappingV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlepathmappingv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttlePathMappingV2026R0TypeField implements Valuable { + SHUTTLE_PATH_MAPPING("shuttle_path_mapping"); + + private final String value; + + ShuttlePathMappingV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttlePathMappingV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttlePathMappingV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttlePathMappingV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttlePathMappingV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttlePathMappingV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0.java new file mode 100644 index 000000000..6c0fb4087 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0.java @@ -0,0 +1,189 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import java.util.Objects; + +/** + * The request body used to generate a report for a shuttle run. Generation is asynchronous: the + * created report is returned immediately in `pending` or `processing` status. Poll `GET + * /shuttle_reports/{shuttle_report_id}` while `status` is `pending` or `processing`. Stop when + * `status` is `complete`, `failed`, `canceled`, or `unknown`. Repeating this request with the same + * parameters reuses the existing report instead of creating a duplicate. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleReportCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle run to generate a report for. */ + @JsonProperty("run_id") + protected final String runId; + + /** The output file format of the report. */ + @JsonDeserialize( + using = + ShuttleReportCreateRequestV2026R0FormatField + .ShuttleReportCreateRequestV2026R0FormatFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleReportCreateRequestV2026R0FormatField + .ShuttleReportCreateRequestV2026R0FormatFieldSerializer.class) + protected final EnumWrapper format; + + /** + * The sections to include in the report. Must be a non-empty subset of the run's + * `available_report_sections`. This is an open list whose set of values is expected to grow; the + * currently documented values include `files_and_folders`, `event_log`, `transfer_overview`, + * `source_users`, `target_users`, `source_collaborators`, `target_collaborators`, + * `source_collaborations`, and `target_collaborations`. + */ + protected final List sections; + + /** + * Which users to include in user-related report sections. Defaults to `migrated` when omitted. + */ + @JsonDeserialize( + using = + ShuttleReportCreateRequestV2026R0UsersScopeField + .ShuttleReportCreateRequestV2026R0UsersScopeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleReportCreateRequestV2026R0UsersScopeField + .ShuttleReportCreateRequestV2026R0UsersScopeFieldSerializer.class) + @JsonProperty("users_scope") + protected EnumWrapper usersScope; + + public ShuttleReportCreateRequestV2026R0( + String runId, ShuttleReportCreateRequestV2026R0FormatField format, List sections) { + super(); + this.runId = runId; + this.format = new EnumWrapper(format); + this.sections = sections; + } + + public ShuttleReportCreateRequestV2026R0( + @JsonProperty("run_id") String runId, + @JsonProperty("format") EnumWrapper format, + @JsonProperty("sections") List sections) { + super(); + this.runId = runId; + this.format = format; + this.sections = sections; + } + + protected ShuttleReportCreateRequestV2026R0(Builder builder) { + super(); + this.runId = builder.runId; + this.format = builder.format; + this.sections = builder.sections; + this.usersScope = builder.usersScope; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getRunId() { + return runId; + } + + public EnumWrapper getFormat() { + return format; + } + + public List getSections() { + return sections; + } + + public EnumWrapper getUsersScope() { + return usersScope; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleReportCreateRequestV2026R0 casted = (ShuttleReportCreateRequestV2026R0) o; + return Objects.equals(runId, casted.runId) + && Objects.equals(format, casted.format) + && Objects.equals(sections, casted.sections) + && Objects.equals(usersScope, casted.usersScope); + } + + @Override + public int hashCode() { + return Objects.hash(runId, format, sections, usersScope); + } + + @Override + public String toString() { + return "ShuttleReportCreateRequestV2026R0{" + + "runId='" + + runId + + '\'' + + ", " + + "format='" + + format + + '\'' + + ", " + + "sections='" + + sections + + '\'' + + ", " + + "usersScope='" + + usersScope + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String runId; + + protected final EnumWrapper format; + + protected final List sections; + + protected EnumWrapper usersScope; + + public Builder( + String runId, ShuttleReportCreateRequestV2026R0FormatField format, List sections) { + super(); + this.runId = runId; + this.format = new EnumWrapper(format); + this.sections = sections; + } + + public Builder( + String runId, + EnumWrapper format, + List sections) { + super(); + this.runId = runId; + this.format = format; + this.sections = sections; + } + + public Builder usersScope(ShuttleReportCreateRequestV2026R0UsersScopeField usersScope) { + this.usersScope = + new EnumWrapper(usersScope); + return this; + } + + public Builder usersScope( + EnumWrapper usersScope) { + this.usersScope = usersScope; + return this; + } + + public ShuttleReportCreateRequestV2026R0 build() { + return new ShuttleReportCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0FormatField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0FormatField.java new file mode 100644 index 000000000..c5859838a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0FormatField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportcreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportCreateRequestV2026R0FormatField implements Valuable { + XLSX("xlsx"), + CSV("csv"); + + private final String value; + + ShuttleReportCreateRequestV2026R0FormatField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportCreateRequestV2026R0FormatFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportCreateRequestV2026R0FormatFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportCreateRequestV2026R0FormatField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportCreateRequestV2026R0FormatFieldSerializer + extends JsonSerializer> { + + public ShuttleReportCreateRequestV2026R0FormatFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0UsersScopeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0UsersScopeField.java new file mode 100644 index 000000000..d2a8fa62d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportcreaterequestv2026r0/ShuttleReportCreateRequestV2026R0UsersScopeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportcreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportCreateRequestV2026R0UsersScopeField implements Valuable { + MIGRATED("migrated"), + ALL("all"); + + private final String value; + + ShuttleReportCreateRequestV2026R0UsersScopeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportCreateRequestV2026R0UsersScopeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportCreateRequestV2026R0UsersScopeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportCreateRequestV2026R0UsersScopeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportCreateRequestV2026R0UsersScopeFieldSerializer + extends JsonSerializer> { + + public ShuttleReportCreateRequestV2026R0UsersScopeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0.java new file mode 100644 index 000000000..f5908747a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0.java @@ -0,0 +1,70 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportoutputv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A reference to the generated Box file or folder. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleReportOutputV2026R0 extends SerializableObject { + + /** The unique identifier of the generated Box file or folder. */ + protected final String id; + + /** The Box object type of the generated file or folder. */ + @JsonDeserialize( + using = + ShuttleReportOutputV2026R0TypeField.ShuttleReportOutputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleReportOutputV2026R0TypeField.ShuttleReportOutputV2026R0TypeFieldSerializer.class) + protected final EnumWrapper type; + + public ShuttleReportOutputV2026R0(String id, ShuttleReportOutputV2026R0TypeField type) { + super(); + this.id = id; + this.type = new EnumWrapper(type); + } + + public ShuttleReportOutputV2026R0( + @JsonProperty("id") String id, + @JsonProperty("type") EnumWrapper type) { + super(); + this.id = id; + this.type = type; + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleReportOutputV2026R0 casted = (ShuttleReportOutputV2026R0) o; + return Objects.equals(id, casted.id) && Objects.equals(type, casted.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + return "ShuttleReportOutputV2026R0{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0TypeField.java new file mode 100644 index 000000000..4cab1748d --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportoutputv2026r0/ShuttleReportOutputV2026R0TypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportoutputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportOutputV2026R0TypeField implements Valuable { + FILE("file"), + FOLDER("folder"); + + private final String value; + + ShuttleReportOutputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportOutputV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportOutputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportOutputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportOutputV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleReportOutputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportsv2026r0/ShuttleReportsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportsv2026r0/ShuttleReportsV2026R0.java new file mode 100644 index 000000000..212fc5be6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportsv2026r0/ShuttleReportsV2026R0.java @@ -0,0 +1,142 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0.ShuttleReportV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle reports. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleReportsV2026R0 extends SerializableObject { + + /** A list of shuttle reports. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleReportsV2026R0(@JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleReportsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleReportsV2026R0 casted = (ShuttleReportsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleReportsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleReportsV2026R0 build() { + return new ShuttleReportsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0.java new file mode 100644 index 000000000..e329ee01a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0.java @@ -0,0 +1,339 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.v2026r0.shuttlereportoutputv2026r0.ShuttleReportOutputV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * A report generated asynchronously for a shuttle job run. Keep polling while `status` is `pending` + * or `processing`. Stop when `status` is `complete`, `failed`, `canceled`, or `unknown`. The + * generated Box file or folder is `null` until generation finishes. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleReportV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle report. */ + protected final String id; + + /** The value will always be `shuttle_report`. */ + @JsonDeserialize( + using = ShuttleReportV2026R0TypeField.ShuttleReportV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttleReportV2026R0TypeField.ShuttleReportV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle run this report was generated for. */ + @JsonProperty("run_id") + protected final String runId; + + /** + * The generation status of the report. This is an open string whose set of values is expected to + * grow; the currently documented values include `pending`, `processing`, `complete`, `failed`, + * `canceled`, and `unknown`. Keep polling `pending` and `processing`. Stop on `complete`, + * `failed`, `canceled`, and `unknown`. Treat any value that is not recognized the same as + * `unknown`: do not fail parsing, and do not keep polling. + */ + protected final String status; + + /** The output file format of the report. */ + @JsonDeserialize( + using = ShuttleReportV2026R0FormatField.ShuttleReportV2026R0FormatFieldDeserializer.class) + @JsonSerialize( + using = ShuttleReportV2026R0FormatField.ShuttleReportV2026R0FormatFieldSerializer.class) + protected final EnumWrapper format; + + /** + * The sections included in the report. Echoes the sections requested on create. This is an open + * list whose set of values is expected to grow; the currently documented values include + * `files_and_folders`, `event_log`, `transfer_overview`, `source_users`, `target_users`, + * `source_collaborators`, `target_collaborators`, `source_collaborations`, and + * `target_collaborations`. Omitted on older reports that have no stored section list. New reports + * always include this field. + */ + protected List sections; + + /** Which users are included in user-related report sections. */ + @JsonDeserialize( + using = + ShuttleReportV2026R0UsersScopeField.ShuttleReportV2026R0UsersScopeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleReportV2026R0UsersScopeField.ShuttleReportV2026R0UsersScopeFieldSerializer.class) + @JsonProperty("users_scope") + protected EnumWrapper usersScope; + + /** The generated Box file or folder. Always present; `null` until `status` is `complete`. */ + protected ShuttleReportOutputV2026R0 output; + + /** When report generation was requested. */ + @JsonProperty("created_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + protected OffsetDateTime createdAt; + + /** + * When report generation finished. Always present; `null` while generation is still in progress. + */ + @JsonProperty("completed_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + @Nullable + protected OffsetDateTime completedAt; + + public ShuttleReportV2026R0( + String id, String runId, String status, ShuttleReportV2026R0FormatField format) { + super(); + this.id = id; + this.runId = runId; + this.status = status; + this.format = new EnumWrapper(format); + this.type = + new EnumWrapper( + ShuttleReportV2026R0TypeField.SHUTTLE_REPORT); + } + + public ShuttleReportV2026R0( + @JsonProperty("id") String id, + @JsonProperty("run_id") String runId, + @JsonProperty("status") String status, + @JsonProperty("format") EnumWrapper format) { + super(); + this.id = id; + this.runId = runId; + this.status = status; + this.format = format; + this.type = + new EnumWrapper( + ShuttleReportV2026R0TypeField.SHUTTLE_REPORT); + } + + protected ShuttleReportV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.runId = builder.runId; + this.status = builder.status; + this.format = builder.format; + this.sections = builder.sections; + this.usersScope = builder.usersScope; + this.output = builder.output; + this.createdAt = builder.createdAt; + this.completedAt = builder.completedAt; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getRunId() { + return runId; + } + + public String getStatus() { + return status; + } + + public EnumWrapper getFormat() { + return format; + } + + public List getSections() { + return sections; + } + + public EnumWrapper getUsersScope() { + return usersScope; + } + + public ShuttleReportOutputV2026R0 getOutput() { + return output; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public OffsetDateTime getCompletedAt() { + return completedAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleReportV2026R0 casted = (ShuttleReportV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(runId, casted.runId) + && Objects.equals(status, casted.status) + && Objects.equals(format, casted.format) + && Objects.equals(sections, casted.sections) + && Objects.equals(usersScope, casted.usersScope) + && Objects.equals(output, casted.output) + && Objects.equals(createdAt, casted.createdAt) + && Objects.equals(completedAt, casted.completedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + id, type, runId, status, format, sections, usersScope, output, createdAt, completedAt); + } + + @Override + public String toString() { + return "ShuttleReportV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "runId='" + + runId + + '\'' + + ", " + + "status='" + + status + + '\'' + + ", " + + "format='" + + format + + '\'' + + ", " + + "sections='" + + sections + + '\'' + + ", " + + "usersScope='" + + usersScope + + '\'' + + ", " + + "output='" + + output + + '\'' + + ", " + + "createdAt='" + + createdAt + + '\'' + + ", " + + "completedAt='" + + completedAt + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String runId; + + protected final String status; + + protected final EnumWrapper format; + + protected List sections; + + protected EnumWrapper usersScope; + + protected ShuttleReportOutputV2026R0 output; + + protected OffsetDateTime createdAt; + + protected OffsetDateTime completedAt; + + public Builder(String id, String runId, String status, ShuttleReportV2026R0FormatField format) { + super(); + this.id = id; + this.runId = runId; + this.status = status; + this.format = new EnumWrapper(format); + } + + public Builder( + String id, + String runId, + String status, + EnumWrapper format) { + super(); + this.id = id; + this.runId = runId; + this.status = status; + this.format = format; + } + + public Builder type(ShuttleReportV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder sections(List sections) { + this.sections = sections; + return this; + } + + public Builder usersScope(ShuttleReportV2026R0UsersScopeField usersScope) { + this.usersScope = new EnumWrapper(usersScope); + return this; + } + + public Builder usersScope(EnumWrapper usersScope) { + this.usersScope = usersScope; + return this; + } + + public Builder output(ShuttleReportOutputV2026R0 output) { + this.output = output; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder completedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + this.markNullableFieldAsSet("completed_at"); + return this; + } + + public ShuttleReportV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleReportV2026R0TypeField.SHUTTLE_REPORT); + } + return new ShuttleReportV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0FormatField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0FormatField.java new file mode 100644 index 000000000..3c12ba84f --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0FormatField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportV2026R0FormatField implements Valuable { + XLSX("xlsx"), + CSV("csv"); + + private final String value; + + ShuttleReportV2026R0FormatField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportV2026R0FormatFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportV2026R0FormatFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportV2026R0FormatField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportV2026R0FormatFieldSerializer + extends JsonSerializer> { + + public ShuttleReportV2026R0FormatFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0TypeField.java new file mode 100644 index 000000000..2d39f65bb --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportV2026R0TypeField implements Valuable { + SHUTTLE_REPORT("shuttle_report"); + + private final String value; + + ShuttleReportV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleReportV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0UsersScopeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0UsersScopeField.java new file mode 100644 index 000000000..e455ed0ea --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlereportv2026r0/ShuttleReportV2026R0UsersScopeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlereportv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleReportV2026R0UsersScopeField implements Valuable { + MIGRATED("migrated"), + ALL("all"); + + private final String value; + + ShuttleReportV2026R0UsersScopeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleReportV2026R0UsersScopeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleReportV2026R0UsersScopeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleReportV2026R0UsersScopeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleReportV2026R0UsersScopeFieldSerializer + extends JsonSerializer> { + + public ShuttleReportV2026R0UsersScopeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunsv2026r0/ShuttleRunsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunsv2026r0/ShuttleRunsV2026R0.java new file mode 100644 index 000000000..c7c36857a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunsv2026r0/ShuttleRunsV2026R0.java @@ -0,0 +1,142 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlerunsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlerunv2026r0.ShuttleRunV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle runs. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleRunsV2026R0 extends SerializableObject { + + /** A list of shuttle runs. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleRunsV2026R0(@JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleRunsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleRunsV2026R0 casted = (ShuttleRunsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleRunsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleRunsV2026R0 build() { + return new ShuttleRunsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0.java new file mode 100644 index 000000000..13c57f99c --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0.java @@ -0,0 +1,328 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlerunv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.internal.utils.DateTimeUtils; +import com.box.sdkgen.schemas.v2026r0.userbasev2026r0.UserBaseV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * A historical instance of a shuttle job run. A run is created each time a job is started. Run IDs + * have the form `{job_id}:{run_number}`. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleRunV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle run, in the form `{job_id}:{run_number}`. */ + protected final String id; + + /** The value will always be `shuttle_run`. */ + @JsonDeserialize(using = ShuttleRunV2026R0TypeField.ShuttleRunV2026R0TypeFieldDeserializer.class) + @JsonSerialize(using = ShuttleRunV2026R0TypeField.ShuttleRunV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this run belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** + * The mode the run was started in. This is an open string whose set of values is expected to + * grow; the currently documented values include `transfer`, `simulation`, `analysis`, `scan`, and + * `unknown`. Clients should treat any value they do not recognize as `unknown`. + */ + @JsonProperty("run_mode") + protected final String runMode; + + /** + * The current state of the shuttle run. This is an open string whose set of values is expected to + * grow; the currently documented values include `running`, `stopping`, `completed`, + * `completed_with_errors`, `stopped`, `failed`, `timed_out`, and `unknown`. Clients should treat + * any value they do not recognize as `unknown`. + */ + protected final String state; + + /** When the run started. */ + @JsonProperty("started_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + protected OffsetDateTime startedAt; + + /** When the run ended. `null` while the run is still in progress. */ + @JsonProperty("ended_at") + @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class) + @Nullable + protected OffsetDateTime endedAt; + + /** Total duration of the run in seconds. `null` while the run is still in progress. */ + @JsonProperty("duration_seconds") + @Nullable + protected Long durationSeconds; + + /** Transfer statistics collected during the run. */ + protected ShuttleRunV2026R0StatsField stats; + + /** The user who started the run. `null` for schedule- or system-initiated runs. */ + @JsonProperty("created_by") + protected UserBaseV2026R0 createdBy; + + /** + * Report sections that can be requested for this run. This is an open list whose set of values is + * expected to grow; the currently documented values include `files_and_folders`, `event_log`, + * `transfer_overview`, `source_users`, `target_users`, `source_collaborators`, + * `target_collaborators`, `source_collaborations`, and `target_collaborations`. + */ + @JsonProperty("available_report_sections") + protected List availableReportSections; + + public ShuttleRunV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("run_mode") String runMode, + @JsonProperty("state") String state) { + super(); + this.id = id; + this.jobId = jobId; + this.runMode = runMode; + this.state = state; + this.type = new EnumWrapper(ShuttleRunV2026R0TypeField.SHUTTLE_RUN); + } + + protected ShuttleRunV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.runMode = builder.runMode; + this.state = builder.state; + this.startedAt = builder.startedAt; + this.endedAt = builder.endedAt; + this.durationSeconds = builder.durationSeconds; + this.stats = builder.stats; + this.createdBy = builder.createdBy; + this.availableReportSections = builder.availableReportSections; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public String getRunMode() { + return runMode; + } + + public String getState() { + return state; + } + + public OffsetDateTime getStartedAt() { + return startedAt; + } + + public OffsetDateTime getEndedAt() { + return endedAt; + } + + public Long getDurationSeconds() { + return durationSeconds; + } + + public ShuttleRunV2026R0StatsField getStats() { + return stats; + } + + public UserBaseV2026R0 getCreatedBy() { + return createdBy; + } + + public List getAvailableReportSections() { + return availableReportSections; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleRunV2026R0 casted = (ShuttleRunV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(runMode, casted.runMode) + && Objects.equals(state, casted.state) + && Objects.equals(startedAt, casted.startedAt) + && Objects.equals(endedAt, casted.endedAt) + && Objects.equals(durationSeconds, casted.durationSeconds) + && Objects.equals(stats, casted.stats) + && Objects.equals(createdBy, casted.createdBy) + && Objects.equals(availableReportSections, casted.availableReportSections); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + jobId, + runMode, + state, + startedAt, + endedAt, + durationSeconds, + stats, + createdBy, + availableReportSections); + } + + @Override + public String toString() { + return "ShuttleRunV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "runMode='" + + runMode + + '\'' + + ", " + + "state='" + + state + + '\'' + + ", " + + "startedAt='" + + startedAt + + '\'' + + ", " + + "endedAt='" + + endedAt + + '\'' + + ", " + + "durationSeconds='" + + durationSeconds + + '\'' + + ", " + + "stats='" + + stats + + '\'' + + ", " + + "createdBy='" + + createdBy + + '\'' + + ", " + + "availableReportSections='" + + availableReportSections + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected final String runMode; + + protected final String state; + + protected OffsetDateTime startedAt; + + protected OffsetDateTime endedAt; + + protected Long durationSeconds; + + protected ShuttleRunV2026R0StatsField stats; + + protected UserBaseV2026R0 createdBy; + + protected List availableReportSections; + + public Builder(String id, String jobId, String runMode, String state) { + super(); + this.id = id; + this.jobId = jobId; + this.runMode = runMode; + this.state = state; + } + + public Builder type(ShuttleRunV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder startedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + return this; + } + + public Builder endedAt(OffsetDateTime endedAt) { + this.endedAt = endedAt; + this.markNullableFieldAsSet("ended_at"); + return this; + } + + public Builder durationSeconds(Long durationSeconds) { + this.durationSeconds = durationSeconds; + this.markNullableFieldAsSet("duration_seconds"); + return this; + } + + public Builder stats(ShuttleRunV2026R0StatsField stats) { + this.stats = stats; + return this; + } + + public Builder createdBy(UserBaseV2026R0 createdBy) { + this.createdBy = createdBy; + return this; + } + + public Builder availableReportSections(List availableReportSections) { + this.availableReportSections = availableReportSections; + return this; + } + + public ShuttleRunV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper(ShuttleRunV2026R0TypeField.SHUTTLE_RUN); + } + return new ShuttleRunV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0StatsField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0StatsField.java new file mode 100644 index 000000000..dcfa165cd --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0StatsField.java @@ -0,0 +1,132 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlerunv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class ShuttleRunV2026R0StatsField extends SerializableObject { + + /** Bytes transferred during the run. */ + @JsonProperty("bytes_sent") + protected Long bytesSent; + + /** Files transferred during the run. */ + @JsonProperty("files_sent") + protected Long filesSent; + + /** Folders created on the destination during the run. */ + @JsonProperty("folders_created") + protected Long foldersCreated; + + /** Whether these figures are estimates rather than final counts. */ + @JsonProperty("is_estimated") + protected Boolean isEstimated; + + public ShuttleRunV2026R0StatsField() { + super(); + } + + protected ShuttleRunV2026R0StatsField(Builder builder) { + super(); + this.bytesSent = builder.bytesSent; + this.filesSent = builder.filesSent; + this.foldersCreated = builder.foldersCreated; + this.isEstimated = builder.isEstimated; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Long getBytesSent() { + return bytesSent; + } + + public Long getFilesSent() { + return filesSent; + } + + public Long getFoldersCreated() { + return foldersCreated; + } + + public Boolean getIsEstimated() { + return isEstimated; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleRunV2026R0StatsField casted = (ShuttleRunV2026R0StatsField) o; + return Objects.equals(bytesSent, casted.bytesSent) + && Objects.equals(filesSent, casted.filesSent) + && Objects.equals(foldersCreated, casted.foldersCreated) + && Objects.equals(isEstimated, casted.isEstimated); + } + + @Override + public int hashCode() { + return Objects.hash(bytesSent, filesSent, foldersCreated, isEstimated); + } + + @Override + public String toString() { + return "ShuttleRunV2026R0StatsField{" + + "bytesSent='" + + bytesSent + + '\'' + + ", " + + "filesSent='" + + filesSent + + '\'' + + ", " + + "foldersCreated='" + + foldersCreated + + '\'' + + ", " + + "isEstimated='" + + isEstimated + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Long bytesSent; + + protected Long filesSent; + + protected Long foldersCreated; + + protected Boolean isEstimated; + + public Builder bytesSent(Long bytesSent) { + this.bytesSent = bytesSent; + return this; + } + + public Builder filesSent(Long filesSent) { + this.filesSent = filesSent; + return this; + } + + public Builder foldersCreated(Long foldersCreated) { + this.foldersCreated = foldersCreated; + return this; + } + + public Builder isEstimated(Boolean isEstimated) { + this.isEstimated = isEstimated; + return this; + } + + public ShuttleRunV2026R0StatsField build() { + return new ShuttleRunV2026R0StatsField(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0TypeField.java new file mode 100644 index 000000000..ff6ea8b21 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlerunv2026r0/ShuttleRunV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlerunv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleRunV2026R0TypeField implements Valuable { + SHUTTLE_RUN("shuttle_run"); + + private final String value; + + ShuttleRunV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleRunV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleRunV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleRunV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleRunV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleRunV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingcreaterequestv2026r0/ShuttleSubjectMappingCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingcreaterequestv2026r0/ShuttleSubjectMappingCreateRequestV2026R0.java new file mode 100644 index 000000000..e4c3deb6a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingcreaterequestv2026r0/ShuttleSubjectMappingCreateRequestV2026R0.java @@ -0,0 +1,154 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectinputv2026r0.ShuttleTargetSubjectInputV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The request body used to create a new shuttle subject mapping. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectMappingCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle job this mapping belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** The unique identifier of the discovered subject to map. */ + @JsonProperty("discovered_subject_id") + protected final String discoveredSubjectId; + + /** The discovery-requirements revision to resolve against. Omit to use the latest revision. */ + protected Integer revision; + + /** Whether this subject should be skipped during the migration. Defaults to `false`. */ + @JsonProperty("is_subject_skipped") + protected Boolean isSubjectSkipped; + + /** The Box target to map to. Omit or set to `null` when the subject is skipped. */ + protected ShuttleTargetSubjectInputV2026R0 target; + + public ShuttleSubjectMappingCreateRequestV2026R0( + @JsonProperty("job_id") String jobId, + @JsonProperty("discovered_subject_id") String discoveredSubjectId) { + super(); + this.jobId = jobId; + this.discoveredSubjectId = discoveredSubjectId; + } + + protected ShuttleSubjectMappingCreateRequestV2026R0(Builder builder) { + super(); + this.jobId = builder.jobId; + this.discoveredSubjectId = builder.discoveredSubjectId; + this.revision = builder.revision; + this.isSubjectSkipped = builder.isSubjectSkipped; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getJobId() { + return jobId; + } + + public String getDiscoveredSubjectId() { + return discoveredSubjectId; + } + + public Integer getRevision() { + return revision; + } + + public Boolean getIsSubjectSkipped() { + return isSubjectSkipped; + } + + public ShuttleTargetSubjectInputV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectMappingCreateRequestV2026R0 casted = + (ShuttleSubjectMappingCreateRequestV2026R0) o; + return Objects.equals(jobId, casted.jobId) + && Objects.equals(discoveredSubjectId, casted.discoveredSubjectId) + && Objects.equals(revision, casted.revision) + && Objects.equals(isSubjectSkipped, casted.isSubjectSkipped) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, discoveredSubjectId, revision, isSubjectSkipped, target); + } + + @Override + public String toString() { + return "ShuttleSubjectMappingCreateRequestV2026R0{" + + "jobId='" + + jobId + + '\'' + + ", " + + "discoveredSubjectId='" + + discoveredSubjectId + + '\'' + + ", " + + "revision='" + + revision + + '\'' + + ", " + + "isSubjectSkipped='" + + isSubjectSkipped + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String jobId; + + protected final String discoveredSubjectId; + + protected Integer revision; + + protected Boolean isSubjectSkipped; + + protected ShuttleTargetSubjectInputV2026R0 target; + + public Builder(String jobId, String discoveredSubjectId) { + super(); + this.jobId = jobId; + this.discoveredSubjectId = discoveredSubjectId; + } + + public Builder revision(Integer revision) { + this.revision = revision; + return this; + } + + public Builder isSubjectSkipped(Boolean isSubjectSkipped) { + this.isSubjectSkipped = isSubjectSkipped; + return this; + } + + public Builder target(ShuttleTargetSubjectInputV2026R0 target) { + this.target = target; + return this; + } + + public ShuttleSubjectMappingCreateRequestV2026R0 build() { + return new ShuttleSubjectMappingCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingimportcreaterequestv2026r0/ShuttleSubjectMappingImportCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingimportcreaterequestv2026r0/ShuttleSubjectMappingImportCreateRequestV2026R0.java new file mode 100644 index 000000000..fb6798519 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingimportcreaterequestv2026r0/ShuttleSubjectMappingImportCreateRequestV2026R0.java @@ -0,0 +1,71 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingimportcreaterequestv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The request body used to import a shuttle job's subject mappings from a spreadsheet already + * stored in Box. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectMappingImportCreateRequestV2026R0 extends SerializableObject { + + /** The unique identifier of the shuttle job whose subject mappings are replaced. */ + @JsonProperty("job_id") + protected final String jobId; + + /** + * The unique identifier of the Box file holding the mapping workbook. The file is read as the + * calling user, so it must live somewhere that user can download from. + */ + @JsonProperty("file_id") + protected final String fileId; + + public ShuttleSubjectMappingImportCreateRequestV2026R0( + @JsonProperty("job_id") String jobId, @JsonProperty("file_id") String fileId) { + super(); + this.jobId = jobId; + this.fileId = fileId; + } + + public String getJobId() { + return jobId; + } + + public String getFileId() { + return fileId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectMappingImportCreateRequestV2026R0 casted = + (ShuttleSubjectMappingImportCreateRequestV2026R0) o; + return Objects.equals(jobId, casted.jobId) && Objects.equals(fileId, casted.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, fileId); + } + + @Override + public String toString() { + return "ShuttleSubjectMappingImportCreateRequestV2026R0{" + + "jobId='" + + jobId + + '\'' + + ", " + + "fileId='" + + fileId + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingsv2026r0/ShuttleSubjectMappingsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingsv2026r0/ShuttleSubjectMappingsV2026R0.java new file mode 100644 index 000000000..94151f7f6 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingsv2026r0/ShuttleSubjectMappingsV2026R0.java @@ -0,0 +1,143 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingv2026r0.ShuttleSubjectMappingV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle subject mappings. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectMappingsV2026R0 extends SerializableObject { + + /** A list of shuttle subject mappings. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleSubjectMappingsV2026R0( + @JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleSubjectMappingsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectMappingsV2026R0 casted = (ShuttleSubjectMappingsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleSubjectMappingsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleSubjectMappingsV2026R0 build() { + return new ShuttleSubjectMappingsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingupdaterequestv2026r0/ShuttleSubjectMappingUpdateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingupdaterequestv2026r0/ShuttleSubjectMappingUpdateRequestV2026R0.java new file mode 100644 index 000000000..40342234a --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingupdaterequestv2026r0/ShuttleSubjectMappingUpdateRequestV2026R0.java @@ -0,0 +1,100 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingupdaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectinputv2026r0.ShuttleTargetSubjectInputV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The request body used to update an existing shuttle subject mapping. Only the fields supplied in + * the request body are changed. `job_id`, `id`, `type`, `source`, `discovered_subject_id`, and + * `revision` are immutable. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectMappingUpdateRequestV2026R0 extends SerializableObject { + + /** Whether this subject should be skipped during the migration. */ + @JsonProperty("is_subject_skipped") + protected Boolean isSubjectSkipped; + + /** + * The Box target to map to. Set to `null` only for a skipped subject. Setting it to `null` while + * the mapping is active fails validation. Updating `is_subject_skipped` alone preserves the + * existing target. + */ + protected ShuttleTargetSubjectInputV2026R0 target; + + public ShuttleSubjectMappingUpdateRequestV2026R0() { + super(); + } + + protected ShuttleSubjectMappingUpdateRequestV2026R0(Builder builder) { + super(); + this.isSubjectSkipped = builder.isSubjectSkipped; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public Boolean getIsSubjectSkipped() { + return isSubjectSkipped; + } + + public ShuttleTargetSubjectInputV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectMappingUpdateRequestV2026R0 casted = + (ShuttleSubjectMappingUpdateRequestV2026R0) o; + return Objects.equals(isSubjectSkipped, casted.isSubjectSkipped) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash(isSubjectSkipped, target); + } + + @Override + public String toString() { + return "ShuttleSubjectMappingUpdateRequestV2026R0{" + + "isSubjectSkipped='" + + isSubjectSkipped + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected Boolean isSubjectSkipped; + + protected ShuttleTargetSubjectInputV2026R0 target; + + public Builder isSubjectSkipped(Boolean isSubjectSkipped) { + this.isSubjectSkipped = isSubjectSkipped; + return this; + } + + public Builder target(ShuttleTargetSubjectInputV2026R0 target) { + this.target = target; + return this; + } + + public ShuttleSubjectMappingUpdateRequestV2026R0 build() { + return new ShuttleSubjectMappingUpdateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0.java new file mode 100644 index 000000000..e4a5e2dae --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0.java @@ -0,0 +1,248 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectv2026r0.ShuttleSubjectV2026R0; +import com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectv2026r0.ShuttleTargetSubjectV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A standard representation of a shuttle subject mapping. A subject mapping connects a discovered + * source subject to a Box user or group, or marks the subject as skipped. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectMappingV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle subject mapping. */ + protected final String id; + + /** The value will always be `shuttle_subject_mapping`. */ + @JsonDeserialize( + using = + ShuttleSubjectMappingV2026R0TypeField.ShuttleSubjectMappingV2026R0TypeFieldDeserializer + .class) + @JsonSerialize( + using = + ShuttleSubjectMappingV2026R0TypeField.ShuttleSubjectMappingV2026R0TypeFieldSerializer + .class) + protected EnumWrapper type; + + /** The unique identifier of the shuttle job this mapping belongs to. */ + @JsonProperty("job_id") + protected final String jobId; + + /** + * The unique identifier of the discovered subject this mapping applies to. `null` for legacy + * mappings created before this field was tracked. + */ + @JsonProperty("discovered_subject_id") + @Nullable + protected String discoveredSubjectId; + + /** + * The discovery-requirements revision this mapping was resolved against. `null` for legacy + * mappings. + */ + @Nullable protected Integer revision; + + /** Whether this subject is skipped during the migration. */ + @JsonProperty("is_subject_skipped") + protected final boolean isSubjectSkipped; + + protected final ShuttleSubjectV2026R0 source; + + /** The Box target subject. `null` when the subject is skipped or not yet assigned. */ + protected ShuttleTargetSubjectV2026R0 target; + + public ShuttleSubjectMappingV2026R0( + @JsonProperty("id") String id, + @JsonProperty("job_id") String jobId, + @JsonProperty("is_subject_skipped") boolean isSubjectSkipped, + @JsonProperty("source") ShuttleSubjectV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isSubjectSkipped = isSubjectSkipped; + this.source = source; + this.type = + new EnumWrapper( + ShuttleSubjectMappingV2026R0TypeField.SHUTTLE_SUBJECT_MAPPING); + } + + protected ShuttleSubjectMappingV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.jobId = builder.jobId; + this.discoveredSubjectId = builder.discoveredSubjectId; + this.revision = builder.revision; + this.isSubjectSkipped = builder.isSubjectSkipped; + this.source = builder.source; + this.target = builder.target; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getJobId() { + return jobId; + } + + public String getDiscoveredSubjectId() { + return discoveredSubjectId; + } + + public Integer getRevision() { + return revision; + } + + public boolean getIsSubjectSkipped() { + return isSubjectSkipped; + } + + public ShuttleSubjectV2026R0 getSource() { + return source; + } + + public ShuttleTargetSubjectV2026R0 getTarget() { + return target; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectMappingV2026R0 casted = (ShuttleSubjectMappingV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(jobId, casted.jobId) + && Objects.equals(discoveredSubjectId, casted.discoveredSubjectId) + && Objects.equals(revision, casted.revision) + && Objects.equals(isSubjectSkipped, casted.isSubjectSkipped) + && Objects.equals(source, casted.source) + && Objects.equals(target, casted.target); + } + + @Override + public int hashCode() { + return Objects.hash( + id, type, jobId, discoveredSubjectId, revision, isSubjectSkipped, source, target); + } + + @Override + public String toString() { + return "ShuttleSubjectMappingV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "jobId='" + + jobId + + '\'' + + ", " + + "discoveredSubjectId='" + + discoveredSubjectId + + '\'' + + ", " + + "revision='" + + revision + + '\'' + + ", " + + "isSubjectSkipped='" + + isSubjectSkipped + + '\'' + + ", " + + "source='" + + source + + '\'' + + ", " + + "target='" + + target + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String jobId; + + protected String discoveredSubjectId; + + protected Integer revision; + + protected final boolean isSubjectSkipped; + + protected final ShuttleSubjectV2026R0 source; + + protected ShuttleTargetSubjectV2026R0 target; + + public Builder( + String id, String jobId, boolean isSubjectSkipped, ShuttleSubjectV2026R0 source) { + super(); + this.id = id; + this.jobId = jobId; + this.isSubjectSkipped = isSubjectSkipped; + this.source = source; + } + + public Builder type(ShuttleSubjectMappingV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder discoveredSubjectId(String discoveredSubjectId) { + this.discoveredSubjectId = discoveredSubjectId; + this.markNullableFieldAsSet("discovered_subject_id"); + return this; + } + + public Builder revision(Integer revision) { + this.revision = revision; + this.markNullableFieldAsSet("revision"); + return this; + } + + public Builder target(ShuttleTargetSubjectV2026R0 target) { + this.target = target; + return this; + } + + public ShuttleSubjectMappingV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleSubjectMappingV2026R0TypeField.SHUTTLE_SUBJECT_MAPPING); + } + return new ShuttleSubjectMappingV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0TypeField.java new file mode 100644 index 000000000..80a59b020 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectmappingv2026r0/ShuttleSubjectMappingV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectmappingv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSubjectMappingV2026R0TypeField implements Valuable { + SHUTTLE_SUBJECT_MAPPING("shuttle_subject_mapping"); + + private final String value; + + ShuttleSubjectMappingV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSubjectMappingV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleSubjectMappingV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSubjectMappingV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSubjectMappingV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleSubjectMappingV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectrolev2026r0/ShuttleSubjectRoleV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectrolev2026r0/ShuttleSubjectRoleV2026R0.java new file mode 100644 index 000000000..f75b9396f --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectrolev2026r0/ShuttleSubjectRoleV2026R0.java @@ -0,0 +1,70 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectrolev2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSubjectRoleV2026R0 implements Valuable { + OWNER("owner"), + CREATOR("creator"), + UPDATER("updater"), + NAMESPACE_ACCOUNT("namespace_account"), + SHAREE("sharee"), + ACCOUNT_HOLDER("account_holder"), + UNKNOWN("unknown"); + + private final String value; + + ShuttleSubjectRoleV2026R0(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSubjectRoleV2026R0Deserializer + extends JsonDeserializer> { + + public ShuttleSubjectRoleV2026R0Deserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSubjectRoleV2026R0.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSubjectRoleV2026R0Serializer + extends JsonSerializer> { + + public ShuttleSubjectRoleV2026R0Serializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0.java new file mode 100644 index 000000000..b5a8fedc9 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0.java @@ -0,0 +1,237 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlesubjectrolev2026r0.ShuttleSubjectRoleV2026R0; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** A subject discovered on the source migration system, such as a user or group. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSubjectV2026R0 extends SerializableObject { + + /** Whether this subject is a user or a group. */ + @JsonDeserialize( + using = ShuttleSubjectV2026R0TypeField.ShuttleSubjectV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttleSubjectV2026R0TypeField.ShuttleSubjectV2026R0TypeFieldSerializer.class) + protected final EnumWrapper type; + + /** The platform-native identifier of the subject. `null` when the system does not provide one. */ + @Nullable protected String id; + + /** The email address of the subject. `null` when unknown. */ + @Nullable protected String email; + + /** The display name of the subject. `null` when unknown. */ + @Nullable protected String name; + + /** Roles this subject holds on the source. `null` when no roles are known. */ + @JsonDeserialize(using = RolesDeserializer.class) + @JsonSerialize(using = RolesSerializer.class) + @Nullable + protected List> roles; + + public ShuttleSubjectV2026R0(ShuttleSubjectV2026R0TypeField type) { + super(); + this.type = new EnumWrapper(type); + } + + public ShuttleSubjectV2026R0( + @JsonProperty("type") EnumWrapper type) { + super(); + this.type = type; + } + + protected ShuttleSubjectV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + this.email = builder.email; + this.name = builder.name; + this.roles = builder.roles; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + public String getEmail() { + return email; + } + + public String getName() { + return name; + } + + public List> getRoles() { + return roles; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSubjectV2026R0 casted = (ShuttleSubjectV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(id, casted.id) + && Objects.equals(email, casted.email) + && Objects.equals(name, casted.name) + && Objects.equals(roles, casted.roles); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, email, name, roles); + } + + @Override + public String toString() { + return "ShuttleSubjectV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + ", " + + "email='" + + email + + '\'' + + ", " + + "name='" + + name + + '\'' + + ", " + + "roles='" + + roles + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final EnumWrapper type; + + protected String id; + + protected String email; + + protected String name; + + protected List> roles; + + public Builder(ShuttleSubjectV2026R0TypeField type) { + super(); + this.type = new EnumWrapper(type); + } + + public Builder(EnumWrapper type) { + super(); + this.type = type; + } + + public Builder id(String id) { + this.id = id; + this.markNullableFieldAsSet("id"); + return this; + } + + public Builder email(String email) { + this.email = email; + this.markNullableFieldAsSet("email"); + return this; + } + + public Builder name(String name) { + this.name = name; + this.markNullableFieldAsSet("name"); + return this; + } + + public Builder roles(List roles) { + this.roles = EnumWrapper.wrapValuableEnumList(roles, ShuttleSubjectRoleV2026R0.class); + this.markNullableFieldAsSet("roles"); + return this; + } + + public ShuttleSubjectV2026R0 build() { + return new ShuttleSubjectV2026R0(this); + } + } + + public static class RolesDeserializer + extends JsonDeserializer>> { + + public final JsonDeserializer> elementDeserializer; + + public RolesDeserializer() { + super(); + this.elementDeserializer = + new ShuttleSubjectRoleV2026R0.ShuttleSubjectRoleV2026R0Deserializer(); + } + + @Override + public List> deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + JsonNode node = p.getCodec().readTree(p); + List> elements = new ArrayList<>(); + for (JsonNode item : node) { + JsonParser pa = item.traverse(p.getCodec()); + pa.nextToken(); + elements.add(elementDeserializer.deserialize(pa, ctxt)); + } + return elements; + } + } + + public static class RolesSerializer + extends JsonSerializer>> { + + public final JsonSerializer> elementSerializer; + + public RolesSerializer() { + super(); + this.elementSerializer = new ShuttleSubjectRoleV2026R0.ShuttleSubjectRoleV2026R0Serializer(); + } + + @Override + public void serialize( + List> value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeStartArray(); + for (EnumWrapper item : value) { + elementSerializer.serialize(item, gen, serializers); + } + gen.writeEndArray(); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0TypeField.java new file mode 100644 index 000000000..62793ffbf --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesubjectv2026r0/ShuttleSubjectV2026R0TypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesubjectv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSubjectV2026R0TypeField implements Valuable { + USER("user"), + GROUP("group"); + + private final String value; + + ShuttleSubjectV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSubjectV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleSubjectV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSubjectV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSubjectV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleSubjectV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0.java new file mode 100644 index 000000000..4e051eea2 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0.java @@ -0,0 +1,122 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemcreaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * The request body for creating a shuttle system. Only Windows agent systems can be created through + * the public API, so `system_type` must be `windows`. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSystemCreateRequestV2026R0 extends SerializableObject { + + /** The display name for the new shuttle system. */ + protected final String name; + + /** + * The public system type identifier for the new shuttle system. Only `windows` is currently + * supported through the public API. + */ + @JsonDeserialize( + using = + ShuttleSystemCreateRequestV2026R0SystemTypeField + .ShuttleSystemCreateRequestV2026R0SystemTypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleSystemCreateRequestV2026R0SystemTypeField + .ShuttleSystemCreateRequestV2026R0SystemTypeFieldSerializer.class) + @JsonProperty("system_type") + protected EnumWrapper systemType; + + public ShuttleSystemCreateRequestV2026R0(@JsonProperty("name") String name) { + super(); + this.name = name; + this.systemType = + new EnumWrapper( + ShuttleSystemCreateRequestV2026R0SystemTypeField.WINDOWS); + } + + protected ShuttleSystemCreateRequestV2026R0(Builder builder) { + super(); + this.name = builder.name; + this.systemType = builder.systemType; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getName() { + return name; + } + + public EnumWrapper getSystemType() { + return systemType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSystemCreateRequestV2026R0 casted = (ShuttleSystemCreateRequestV2026R0) o; + return Objects.equals(name, casted.name) && Objects.equals(systemType, casted.systemType); + } + + @Override + public int hashCode() { + return Objects.hash(name, systemType); + } + + @Override + public String toString() { + return "ShuttleSystemCreateRequestV2026R0{" + + "name='" + + name + + '\'' + + ", " + + "systemType='" + + systemType + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String name; + + protected EnumWrapper systemType; + + public Builder(String name) { + super(); + this.name = name; + } + + public Builder systemType(ShuttleSystemCreateRequestV2026R0SystemTypeField systemType) { + this.systemType = + new EnumWrapper(systemType); + return this; + } + + public Builder systemType( + EnumWrapper systemType) { + this.systemType = systemType; + return this; + } + + public ShuttleSystemCreateRequestV2026R0 build() { + if (this.systemType == null) { + this.systemType = + new EnumWrapper( + ShuttleSystemCreateRequestV2026R0SystemTypeField.WINDOWS); + } + return new ShuttleSystemCreateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0SystemTypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0SystemTypeField.java new file mode 100644 index 000000000..e9ff07167 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemcreaterequestv2026r0/ShuttleSystemCreateRequestV2026R0SystemTypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemcreaterequestv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSystemCreateRequestV2026R0SystemTypeField implements Valuable { + WINDOWS("windows"); + + private final String value; + + ShuttleSystemCreateRequestV2026R0SystemTypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSystemCreateRequestV2026R0SystemTypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleSystemCreateRequestV2026R0SystemTypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSystemCreateRequestV2026R0SystemTypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSystemCreateRequestV2026R0SystemTypeFieldSerializer + extends JsonSerializer> { + + public ShuttleSystemCreateRequestV2026R0SystemTypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemsv2026r0/ShuttleSystemsV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemsv2026r0/ShuttleSystemsV2026R0.java new file mode 100644 index 000000000..ee1a06f93 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemsv2026r0/ShuttleSystemsV2026R0.java @@ -0,0 +1,142 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemsv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.v2026r0.shuttlesystemv2026r0.ShuttleSystemV2026R0; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +/** A paginated list of shuttle systems. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSystemsV2026R0 extends SerializableObject { + + /** A list of shuttle systems. */ + protected final List entries; + + /** + * The limit that was used for these entries. This will be the same as the `limit` query parameter + * unless that value exceeded the maximum value allowed. The maximum value varies by API. + */ + protected Long limit; + + /** The marker for the start of the next page of results. */ + @JsonProperty("next_marker") + @Nullable + protected String nextMarker; + + /** The marker for the start of the previous page of results. */ + @JsonProperty("prev_marker") + @Nullable + protected String prevMarker; + + public ShuttleSystemsV2026R0(@JsonProperty("entries") List entries) { + super(); + this.entries = entries; + } + + protected ShuttleSystemsV2026R0(Builder builder) { + super(); + this.entries = builder.entries; + this.limit = builder.limit; + this.nextMarker = builder.nextMarker; + this.prevMarker = builder.prevMarker; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public List getEntries() { + return entries; + } + + public Long getLimit() { + return limit; + } + + public String getNextMarker() { + return nextMarker; + } + + public String getPrevMarker() { + return prevMarker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSystemsV2026R0 casted = (ShuttleSystemsV2026R0) o; + return Objects.equals(entries, casted.entries) + && Objects.equals(limit, casted.limit) + && Objects.equals(nextMarker, casted.nextMarker) + && Objects.equals(prevMarker, casted.prevMarker); + } + + @Override + public int hashCode() { + return Objects.hash(entries, limit, nextMarker, prevMarker); + } + + @Override + public String toString() { + return "ShuttleSystemsV2026R0{" + + "entries='" + + entries + + '\'' + + ", " + + "limit='" + + limit + + '\'' + + ", " + + "nextMarker='" + + nextMarker + + '\'' + + ", " + + "prevMarker='" + + prevMarker + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final List entries; + + protected Long limit; + + protected String nextMarker; + + protected String prevMarker; + + public Builder(List entries) { + super(); + this.entries = entries; + } + + public Builder limit(Long limit) { + this.limit = limit; + return this; + } + + public Builder nextMarker(String nextMarker) { + this.nextMarker = nextMarker; + this.markNullableFieldAsSet("next_marker"); + return this; + } + + public Builder prevMarker(String prevMarker) { + this.prevMarker = prevMarker; + this.markNullableFieldAsSet("prev_marker"); + return this; + } + + public ShuttleSystemsV2026R0 build() { + return new ShuttleSystemsV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemupdaterequestv2026r0/ShuttleSystemUpdateRequestV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemupdaterequestv2026r0/ShuttleSystemUpdateRequestV2026R0.java new file mode 100644 index 000000000..142755571 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemupdaterequestv2026r0/ShuttleSystemUpdateRequestV2026R0.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemupdaterequestv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.fasterxml.jackson.annotation.JsonFilter; +import java.util.Objects; + +/** The request body for updating a shuttle system. Only the fields supplied are changed. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSystemUpdateRequestV2026R0 extends SerializableObject { + + /** The updated display name for the shuttle system. */ + protected String name; + + public ShuttleSystemUpdateRequestV2026R0() { + super(); + } + + protected ShuttleSystemUpdateRequestV2026R0(Builder builder) { + super(); + this.name = builder.name; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSystemUpdateRequestV2026R0 casted = (ShuttleSystemUpdateRequestV2026R0) o; + return Objects.equals(name, casted.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return "ShuttleSystemUpdateRequestV2026R0{" + "name='" + name + '\'' + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected String name; + + public Builder name(String name) { + this.name = name; + return this; + } + + public ShuttleSystemUpdateRequestV2026R0 build() { + return new ShuttleSystemUpdateRequestV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0.java new file mode 100644 index 000000000..fc440c979 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0.java @@ -0,0 +1,222 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemv2026r0; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** + * A standard representation of a shuttle system. A shuttle system describes a source or destination + * that Shuttle can migrate content to or from, along with its current connection state. + */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleSystemV2026R0 extends SerializableObject { + + /** The unique identifier for the shuttle system. */ + protected final String id; + + /** The value will always be `shuttle_system`. */ + @JsonDeserialize( + using = ShuttleSystemV2026R0TypeField.ShuttleSystemV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = ShuttleSystemV2026R0TypeField.ShuttleSystemV2026R0TypeFieldSerializer.class) + protected EnumWrapper type; + + /** The display name of the shuttle system. */ + protected final String name; + + /** + * Identifies the kind of source or destination this system represents, for example `box`, + * `windows`, `sharepoint`, or `amazon_s3`. New system types are added over time, so clients must + * tolerate values they do not recognize rather than treating this as a fixed set. + */ + @JsonProperty("system_type") + protected final String systemType; + + /** A server-computed display label for the system. */ + protected String label; + + /** The current connection state of the shuttle system. */ + @JsonDeserialize( + using = ShuttleSystemV2026R0StateField.ShuttleSystemV2026R0StateFieldDeserializer.class) + @JsonSerialize( + using = ShuttleSystemV2026R0StateField.ShuttleSystemV2026R0StateFieldSerializer.class) + protected final EnumWrapper state; + + public ShuttleSystemV2026R0( + String id, String name, String systemType, ShuttleSystemV2026R0StateField state) { + super(); + this.id = id; + this.name = name; + this.systemType = systemType; + this.state = new EnumWrapper(state); + this.type = + new EnumWrapper( + ShuttleSystemV2026R0TypeField.SHUTTLE_SYSTEM); + } + + public ShuttleSystemV2026R0( + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("system_type") String systemType, + @JsonProperty("state") EnumWrapper state) { + super(); + this.id = id; + this.name = name; + this.systemType = systemType; + this.state = state; + this.type = + new EnumWrapper( + ShuttleSystemV2026R0TypeField.SHUTTLE_SYSTEM); + } + + protected ShuttleSystemV2026R0(Builder builder) { + super(); + this.id = builder.id; + this.type = builder.type; + this.name = builder.name; + this.systemType = builder.systemType; + this.label = builder.label; + this.state = builder.state; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getId() { + return id; + } + + public EnumWrapper getType() { + return type; + } + + public String getName() { + return name; + } + + public String getSystemType() { + return systemType; + } + + public String getLabel() { + return label; + } + + public EnumWrapper getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleSystemV2026R0 casted = (ShuttleSystemV2026R0) o; + return Objects.equals(id, casted.id) + && Objects.equals(type, casted.type) + && Objects.equals(name, casted.name) + && Objects.equals(systemType, casted.systemType) + && Objects.equals(label, casted.label) + && Objects.equals(state, casted.state); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, name, systemType, label, state); + } + + @Override + public String toString() { + return "ShuttleSystemV2026R0{" + + "id='" + + id + + '\'' + + ", " + + "type='" + + type + + '\'' + + ", " + + "name='" + + name + + '\'' + + ", " + + "systemType='" + + systemType + + '\'' + + ", " + + "label='" + + label + + '\'' + + ", " + + "state='" + + state + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String id; + + protected EnumWrapper type; + + protected final String name; + + protected final String systemType; + + protected String label; + + protected final EnumWrapper state; + + public Builder( + String id, String name, String systemType, ShuttleSystemV2026R0StateField state) { + super(); + this.id = id; + this.name = name; + this.systemType = systemType; + this.state = new EnumWrapper(state); + } + + public Builder( + String id, + String name, + String systemType, + EnumWrapper state) { + super(); + this.id = id; + this.name = name; + this.systemType = systemType; + this.state = state; + } + + public Builder type(ShuttleSystemV2026R0TypeField type) { + this.type = new EnumWrapper(type); + return this; + } + + public Builder type(EnumWrapper type) { + this.type = type; + return this; + } + + public Builder label(String label) { + this.label = label; + return this; + } + + public ShuttleSystemV2026R0 build() { + if (this.type == null) { + this.type = + new EnumWrapper( + ShuttleSystemV2026R0TypeField.SHUTTLE_SYSTEM); + } + return new ShuttleSystemV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0StateField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0StateField.java new file mode 100644 index 000000000..77b7dfbac --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0StateField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSystemV2026R0StateField implements Valuable { + CONNECTED("connected"), + DISCONNECTED("disconnected"), + UNKNOWN("unknown"); + + private final String value; + + ShuttleSystemV2026R0StateField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSystemV2026R0StateFieldDeserializer + extends JsonDeserializer> { + + public ShuttleSystemV2026R0StateFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSystemV2026R0StateField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSystemV2026R0StateFieldSerializer + extends JsonSerializer> { + + public ShuttleSystemV2026R0StateFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0TypeField.java new file mode 100644 index 000000000..c5edd5424 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttlesystemv2026r0/ShuttleSystemV2026R0TypeField.java @@ -0,0 +1,64 @@ +package com.box.sdkgen.schemas.v2026r0.shuttlesystemv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleSystemV2026R0TypeField implements Valuable { + SHUTTLE_SYSTEM("shuttle_system"); + + private final String value; + + ShuttleSystemV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleSystemV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleSystemV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleSystemV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleSystemV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleSystemV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0.java new file mode 100644 index 000000000..4f3c84afd --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0.java @@ -0,0 +1,81 @@ +package com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectinputv2026r0; + +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A Box user or group to map a source subject to. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleTargetSubjectInputV2026R0 extends SerializableObject { + + /** Whether the Box target is a user or a group. */ + @JsonDeserialize( + using = + ShuttleTargetSubjectInputV2026R0TypeField + .ShuttleTargetSubjectInputV2026R0TypeFieldDeserializer.class) + @JsonSerialize( + using = + ShuttleTargetSubjectInputV2026R0TypeField + .ShuttleTargetSubjectInputV2026R0TypeFieldSerializer.class) + protected final EnumWrapper type; + + /** The identifier of the target Box subject. */ + protected final String id; + + public ShuttleTargetSubjectInputV2026R0( + ShuttleTargetSubjectInputV2026R0TypeField type, String id) { + super(); + this.type = new EnumWrapper(type); + this.id = id; + } + + public ShuttleTargetSubjectInputV2026R0( + @JsonProperty("type") EnumWrapper type, + @JsonProperty("id") String id) { + super(); + this.type = type; + this.id = id; + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleTargetSubjectInputV2026R0 casted = (ShuttleTargetSubjectInputV2026R0) o; + return Objects.equals(type, casted.type) && Objects.equals(id, casted.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + return "ShuttleTargetSubjectInputV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + "}"; + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0TypeField.java new file mode 100644 index 000000000..71e767256 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectinputv2026r0/ShuttleTargetSubjectInputV2026R0TypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectinputv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleTargetSubjectInputV2026R0TypeField implements Valuable { + USER("user"), + GROUP("group"); + + private final String value; + + ShuttleTargetSubjectInputV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleTargetSubjectInputV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleTargetSubjectInputV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleTargetSubjectInputV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleTargetSubjectInputV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleTargetSubjectInputV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0.java new file mode 100644 index 000000000..362351336 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0.java @@ -0,0 +1,159 @@ +package com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectv2026r0; + +import com.box.sdkgen.internal.Nullable; +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Objects; + +/** A Box user or group that a source subject is mapped to. */ +@JsonFilter("nullablePropertyFilter") +public class ShuttleTargetSubjectV2026R0 extends SerializableObject { + + /** Whether the Box target is a user or a group. */ + @JsonDeserialize( + using = + ShuttleTargetSubjectV2026R0TypeField.ShuttleTargetSubjectV2026R0TypeFieldDeserializer + .class) + @JsonSerialize( + using = + ShuttleTargetSubjectV2026R0TypeField.ShuttleTargetSubjectV2026R0TypeFieldSerializer.class) + protected final EnumWrapper type; + + /** + * The Box user or group ID. `null` when the mapping was not created through this API and is + * identified by email (user) or name (group) instead. Skip is represented by `target: null`, not + * a missing `id`. Create and update always send `id`. + */ + @Nullable protected String id; + + /** The email address of the target. `null` when unknown. */ + @Nullable protected String email; + + /** The display name of the target. `null` when unknown. */ + @Nullable protected String name; + + public ShuttleTargetSubjectV2026R0(ShuttleTargetSubjectV2026R0TypeField type) { + super(); + this.type = new EnumWrapper(type); + } + + public ShuttleTargetSubjectV2026R0( + @JsonProperty("type") EnumWrapper type) { + super(); + this.type = type; + } + + protected ShuttleTargetSubjectV2026R0(Builder builder) { + super(); + this.type = builder.type; + this.id = builder.id; + this.email = builder.email; + this.name = builder.name; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public EnumWrapper getType() { + return type; + } + + public String getId() { + return id; + } + + public String getEmail() { + return email; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuttleTargetSubjectV2026R0 casted = (ShuttleTargetSubjectV2026R0) o; + return Objects.equals(type, casted.type) + && Objects.equals(id, casted.id) + && Objects.equals(email, casted.email) + && Objects.equals(name, casted.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, email, name); + } + + @Override + public String toString() { + return "ShuttleTargetSubjectV2026R0{" + + "type='" + + type + + '\'' + + ", " + + "id='" + + id + + '\'' + + ", " + + "email='" + + email + + '\'' + + ", " + + "name='" + + name + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final EnumWrapper type; + + protected String id; + + protected String email; + + protected String name; + + public Builder(ShuttleTargetSubjectV2026R0TypeField type) { + super(); + this.type = new EnumWrapper(type); + } + + public Builder(EnumWrapper type) { + super(); + this.type = type; + } + + public Builder id(String id) { + this.id = id; + this.markNullableFieldAsSet("id"); + return this; + } + + public Builder email(String email) { + this.email = email; + this.markNullableFieldAsSet("email"); + return this; + } + + public Builder name(String name) { + this.name = name; + this.markNullableFieldAsSet("name"); + return this; + } + + public ShuttleTargetSubjectV2026R0 build() { + return new ShuttleTargetSubjectV2026R0(this); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0TypeField.java new file mode 100644 index 000000000..7216041b9 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2026r0/shuttletargetsubjectv2026r0/ShuttleTargetSubjectV2026R0TypeField.java @@ -0,0 +1,65 @@ +package com.box.sdkgen.schemas.v2026r0.shuttletargetsubjectv2026r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum ShuttleTargetSubjectV2026R0TypeField implements Valuable { + USER("user"), + GROUP("group"); + + private final String value; + + ShuttleTargetSubjectV2026R0TypeField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class ShuttleTargetSubjectV2026R0TypeFieldDeserializer + extends JsonDeserializer> { + + public ShuttleTargetSubjectV2026R0TypeFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(ShuttleTargetSubjectV2026R0TypeField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class ShuttleTargetSubjectV2026R0TypeFieldSerializer + extends JsonSerializer> { + + public ShuttleTargetSubjectV2026R0TypeFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkField.java b/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkField.java index 4c499bd4f..289eac90c 100644 --- a/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkField.java +++ b/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkField.java @@ -125,13 +125,17 @@ public class WebLinkSharedLinkField extends SerializableObject { @JsonProperty("preview_count") protected final long previewCount; + @JsonProperty("one_time_passcode") + protected final WebLinkSharedLinkOneTimePasscodeField oneTimePasscode; + public WebLinkSharedLinkField( String url, WebLinkSharedLinkEffectiveAccessField effectiveAccess, WebLinkSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -140,6 +144,7 @@ public WebLinkSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public WebLinkSharedLinkField( @@ -148,7 +153,8 @@ public WebLinkSharedLinkField( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = new EnumWrapper(effectiveAccess); @@ -156,6 +162,7 @@ public WebLinkSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public WebLinkSharedLinkField( @@ -164,7 +171,8 @@ public WebLinkSharedLinkField( WebLinkSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -173,6 +181,7 @@ public WebLinkSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public WebLinkSharedLinkField( @@ -183,7 +192,8 @@ public WebLinkSharedLinkField( EnumWrapper effectivePermission, @JsonProperty("is_password_enabled") boolean isPasswordEnabled, @JsonProperty("download_count") long downloadCount, - @JsonProperty("preview_count") long previewCount) { + @JsonProperty("preview_count") long previewCount, + @JsonProperty("one_time_passcode") WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -191,6 +201,7 @@ public WebLinkSharedLinkField( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } protected WebLinkSharedLinkField(Builder builder) { @@ -207,6 +218,7 @@ protected WebLinkSharedLinkField(Builder builder) { this.permissions = builder.permissions; this.downloadCount = builder.downloadCount; this.previewCount = builder.previewCount; + this.oneTimePasscode = builder.oneTimePasscode; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -258,6 +270,10 @@ public long getPreviewCount() { return previewCount; } + public WebLinkSharedLinkOneTimePasscodeField getOneTimePasscode() { + return oneTimePasscode; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -278,7 +294,8 @@ public boolean equals(Object o) { && Objects.equals(isPasswordEnabled, casted.isPasswordEnabled) && Objects.equals(permissions, casted.permissions) && Objects.equals(downloadCount, casted.downloadCount) - && Objects.equals(previewCount, casted.previewCount); + && Objects.equals(previewCount, casted.previewCount) + && Objects.equals(oneTimePasscode, casted.oneTimePasscode); } @Override @@ -295,7 +312,8 @@ public int hashCode() { isPasswordEnabled, permissions, downloadCount, - previewCount); + previewCount, + oneTimePasscode); } @Override @@ -348,6 +366,10 @@ public String toString() { + "previewCount='" + previewCount + '\'' + + ", " + + "oneTimePasscode='" + + oneTimePasscode + + '\'' + "}"; } @@ -377,13 +399,16 @@ public static class Builder extends NullableFieldTracker { protected final long previewCount; + protected final WebLinkSharedLinkOneTimePasscodeField oneTimePasscode; + public Builder( String url, WebLinkSharedLinkEffectiveAccessField effectiveAccess, WebLinkSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = @@ -393,6 +418,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -401,7 +427,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = @@ -410,6 +437,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -418,7 +446,8 @@ public Builder( WebLinkSharedLinkEffectivePermissionField effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -427,6 +456,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder( @@ -435,7 +465,8 @@ public Builder( EnumWrapper effectivePermission, boolean isPasswordEnabled, long downloadCount, - long previewCount) { + long previewCount, + WebLinkSharedLinkOneTimePasscodeField oneTimePasscode) { super(); this.url = url; this.effectiveAccess = effectiveAccess; @@ -443,6 +474,7 @@ public Builder( this.isPasswordEnabled = isPasswordEnabled; this.downloadCount = downloadCount; this.previewCount = previewCount; + this.oneTimePasscode = oneTimePasscode; } public Builder downloadUrl(String downloadUrl) { diff --git a/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkOneTimePasscodeField.java b/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkOneTimePasscodeField.java new file mode 100644 index 000000000..07f4c5023 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkOneTimePasscodeField.java @@ -0,0 +1,110 @@ +package com.box.sdkgen.schemas.weblink; + +import com.box.sdkgen.internal.NullableFieldTracker; +import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.schemas.sharedlinkotpallowlistentry.SharedLinkOtpAllowlistEntry; +import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Objects; + +@JsonFilter("nullablePropertyFilter") +public class WebLinkSharedLinkOneTimePasscodeField extends SerializableObject { + + /** + * The current OTP enforcement mode for the shared link. + * + *

* `none` - OTP enforcement is turned off. The shared link is accessible without any + * one-time-passcode verification. * `open` - Any anonymous recipient can request a + * one-time-passcode to any email address and access the shared link after verifying it. + * Collaborators and registered Box users access the link without being prompted. * `allowlist` - + * Anonymous recipients can request a one-time-passcode only when they enter an email that matches + * an entry on the `allowlist`. + */ + protected final String mode; + + /** + * The list of email and domain entries that are permitted to access the shared link when `mode` + * is `allowlist`. Anonymous users whose email matches an entry can request and verify a + * one-time-passcode. + * + *

Because the entries carry recipient email addresses and the identity of the user who added + * them, this field is only returned to users with owner, co-owner, or editor access on the item. + * For viewer collaborators and below the field is omitted. + * + *

An allowlist contains at most 1000 entries, matching the limit enforced when setting the + * allowlist on a shared link. + */ + protected List allowlist; + + public WebLinkSharedLinkOneTimePasscodeField(@JsonProperty("mode") String mode) { + super(); + this.mode = mode; + } + + protected WebLinkSharedLinkOneTimePasscodeField(Builder builder) { + super(); + this.mode = builder.mode; + this.allowlist = builder.allowlist; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + + public String getMode() { + return mode; + } + + public List getAllowlist() { + return allowlist; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebLinkSharedLinkOneTimePasscodeField casted = (WebLinkSharedLinkOneTimePasscodeField) o; + return Objects.equals(mode, casted.mode) && Objects.equals(allowlist, casted.allowlist); + } + + @Override + public int hashCode() { + return Objects.hash(mode, allowlist); + } + + @Override + public String toString() { + return "WebLinkSharedLinkOneTimePasscodeField{" + + "mode='" + + mode + + '\'' + + ", " + + "allowlist='" + + allowlist + + '\'' + + "}"; + } + + public static class Builder extends NullableFieldTracker { + + protected final String mode; + + protected List allowlist; + + public Builder(String mode) { + super(); + this.mode = mode; + } + + public Builder allowlist(List allowlist) { + this.allowlist = allowlist; + return this; + } + + public WebLinkSharedLinkOneTimePasscodeField build() { + return new WebLinkSharedLinkOneTimePasscodeField(this); + } + } +}