autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2023-08-01
 * Contact: core@stedi.com
 * Generated by: https://openapi-generator.tech
 */

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

/// RetryExecutionSelectionCondition : Specify the file executions to retry. Stedi will retry all executions matching the given criteria. For example, you can retry all file executions with a `FAILED` status within a specific date range.  Note that Stedi only retries each `executionId` once. Each retry attempt is stored as a new file execution within Stedi. If you need to retry a file multiple times, you'll need to pass the ID of the latest retry attempt to this endpoint.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RetryExecutionSelectionCondition {
    /// A list of file execution IDs. These are unique identifiers for the file execution within Stedi. This ID is included in the file processed event, or you can retrieve it manually from the file's details page within the Stedi portal.
    #[serde(rename = "executionIds", skip_serializing_if = "Option::is_none")]
    pub execution_ids: Option<Vec<String>>,
    #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
    pub direction: Option<models::Direction>,
    #[serde(rename = "faultCode", skip_serializing_if = "Option::is_none")]
    pub fault_code: Option<models::ExecutionFaultCode>,
    /// Specify executions associated with a specific partnership. This is the `partnershipId` property in the file execution record. You can also find this ID on the [Trading partners](https://www.stedi.com/app/core/partnerships) page under **Partnership identifier**.
    #[serde(rename = "partnershipId", skip_serializing_if = "Option::is_none")]
    pub partnership_id: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::ExecutionStatus>,
    /// Specify executions processed after this timestamp, in ISO 8601 format. For example, `2023-08-28T00:00:00Z`.
    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
    pub from: Option<chrono::DateTime<chrono::FixedOffset>>,
    /// Specify executions processed before this timestamp, in ISO 8601 format. For example, `2023-08-28T00:00:00Z`.
    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
    pub to: Option<chrono::DateTime<chrono::FixedOffset>>,
}

impl RetryExecutionSelectionCondition {
    /// Specify the file executions to retry. Stedi will retry all executions matching the given criteria. For example, you can retry all file executions with a `FAILED` status within a specific date range.  Note that Stedi only retries each `executionId` once. Each retry attempt is stored as a new file execution within Stedi. If you need to retry a file multiple times, you'll need to pass the ID of the latest retry attempt to this endpoint.
    pub fn new() -> RetryExecutionSelectionCondition {
        RetryExecutionSelectionCondition {
            execution_ids: None,
            direction: None,
            fault_code: None,
            partnership_id: None,
            status: None,
            from: None,
            to: None,
        }
    }
}