orvanta_api/models/queued_data_migration_run.rs
1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.1.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// QueuedDataMigrationRun : Two handles onto a run that has been **queued, not performed** (#1212). `run` no longer waits for the copy: it returns as soon as the job is on the queue, so this object carries no counts. The outcome is the job's result (`MigrationResult`, via `/jobs_u/get/{id}`), progress is `/jobs/get_progress/{id}` and the job SSE stream, and cancellation is `/jobs_u/queue/cancel/{id}` -- a data migration deliberately gets no bespoke status surface.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct QueuedDataMigrationRun {
17 /// The queued job. Its result, progress, logs and cancel control all hang off this id through the ordinary job endpoints.
18 #[serde(rename = "job_id")]
19 pub job_id: uuid::Uuid,
20 /// `data_migration_run.id` of this run's row, which already exists (`status = 'running'`) when this response is sent. Pass it back as `resume_run_id` to continue an interrupted run -- including one that was cancelled, since the stop is taken after the checkpoint for that batch is durable.
21 #[serde(rename = "run_id")]
22 pub run_id: i64,
23}
24
25impl QueuedDataMigrationRun {
26 /// Two handles onto a run that has been **queued, not performed** (#1212). `run` no longer waits for the copy: it returns as soon as the job is on the queue, so this object carries no counts. The outcome is the job's result (`MigrationResult`, via `/jobs_u/get/{id}`), progress is `/jobs/get_progress/{id}` and the job SSE stream, and cancellation is `/jobs_u/queue/cancel/{id}` -- a data migration deliberately gets no bespoke status surface.
27 pub fn new(job_id: uuid::Uuid, run_id: i64) -> QueuedDataMigrationRun {
28 QueuedDataMigrationRun {
29 job_id,
30 run_id,
31 }
32 }
33}
34