orvanta-api 6.5.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 6.5.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// 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.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QueuedDataMigrationRun {
    /// The queued job. Its result, progress, logs and cancel control all hang off this id through the ordinary job endpoints.
    #[serde(rename = "job_id")]
    pub job_id: uuid::Uuid,
    /// `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.
    #[serde(rename = "run_id")]
    pub run_id: i64,
}

impl 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.
    pub fn new(job_id: uuid::Uuid, run_id: i64) -> QueuedDataMigrationRun {
        QueuedDataMigrationRun {
            job_id,
            run_id,
        }
    }
}