orvanta-api 3.0.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: 3.0.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// ProcessActivityRetry : automatic-retry detail attached to a ProcessActivityStatus. Present only when the element's most recent dispatch carried a retry policy. next_attempt_at set means the activity failed and is waiting to be retried at that instant -- the process is running, not broken, and no incident exists yet. next_attempt_at absent with attempt == max_attempts means the budget is spent; if the element also carries an error, that is the dead-lettered activity.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProcessActivityRetry {
    /// 1-based; 1 is the original execution
    #[serde(rename = "attempt")]
    pub attempt: i64,
    /// total attempts permitted, original included
    #[serde(rename = "max_attempts")]
    pub max_attempts: i64,
    #[serde(rename = "next_attempt_at", skip_serializing_if = "Option::is_none")]
    pub next_attempt_at: Option<String>,
}

impl ProcessActivityRetry {
    /// automatic-retry detail attached to a ProcessActivityStatus. Present only when the element's most recent dispatch carried a retry policy. next_attempt_at set means the activity failed and is waiting to be retried at that instant -- the process is running, not broken, and no incident exists yet. next_attempt_at absent with attempt == max_attempts means the budget is spent; if the element also carries an error, that is the dead-lettered activity.
    pub fn new(attempt: i64, max_attempts: i64) -> ProcessActivityRetry {
        ProcessActivityRetry {
            attempt,
            max_attempts,
            next_attempt_at: None,
        }
    }
}