1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
* 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};
/// ExecutionSummary : The processed executions that match the request criteria. The `items` array is empty if there are no matching executions.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExecutionSummary {
/// The date and time when the resource was created, in ISO 8601 format. For example, `2023-08-28T00:00:00Z`.
#[serde(rename = "createdAt")]
pub created_at: chrono::DateTime<chrono::FixedOffset>,
/// The date and time when the resource was last updated, in ISO 8601 format. For example, `2023-08-28T00:00:00Z`.
#[serde(rename = "updatedAt")]
pub updated_at: chrono::DateTime<chrono::FixedOffset>,
/// A unique identifier for the processed file within Stedi. This ID is included in the transaction processed event. You can also retrieve it manually from the file's details page in the Stedi portal.
#[serde(rename = "executionId")]
pub execution_id: String,
#[serde(rename = "status")]
pub status: models::ExecutionStatus,
#[serde(rename = "direction")]
pub direction: models::Direction,
/// The number of individual transactions included in the file.
#[serde(rename = "transactionCount", skip_serializing_if = "Option::is_none")]
pub transaction_count: Option<f64>,
/// The number of errors that occurred during processing. If the file was successfully processed completely, this value is `0`.
#[serde(rename = "faultCount", skip_serializing_if = "Option::is_none")]
pub fault_count: Option<f64>,
#[serde(rename = "faultCode", skip_serializing_if = "Option::is_none")]
pub fault_code: Option<models::ExecutionFaultCode>,
/// A message providing more information about the fault. Note that if there are multiple faults, Stedi sets the first fault as the code and corresponding message.
#[serde(rename = "faultMessage", skip_serializing_if = "Option::is_none")]
pub fault_message: Option<String>,
#[serde(rename = "fileType", skip_serializing_if = "Option::is_none")]
pub file_type: Option<models::FileType>,
/// If `true`, you can retry the file in the Stedi portal.
#[serde(rename = "retryable", skip_serializing_if = "Option::is_none")]
pub retryable: Option<bool>,
/// The ID of this execution's parent execution, if it is part of a retry chain. When you retry a file, Stedi creates a child execution with a new ID and links it to the original (parent) execution.
#[serde(rename = "parentExecutionId", skip_serializing_if = "Option::is_none")]
pub parent_execution_id: Option<String>,
/// The ID of this execution's child execution, if it is part of a retry chain. When you retry a file, Stedi creates a child execution with a new ID and links it to the original (parent) execution.
#[serde(rename = "childExecutionId", skip_serializing_if = "Option::is_none")]
pub child_execution_id: Option<String>,
/// The unique identifier for the partnership within the Stedi platform. A partnership describes all aspects of the EDI relationship between two profiles in your Stedi account, such as which transaction sets they will exchange and other important information for processing EDI files.
#[serde(rename = "partnershipId", skip_serializing_if = "Option::is_none")]
pub partnership_id: Option<String>,
#[serde(rename = "connectionType", skip_serializing_if = "Option::is_none")]
pub connection_type: Option<models::CoreConnectionType>,
/// An autogenerated identifier for the connection within the Stedi platform.
#[serde(rename = "connectionId", skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<Box<models::ExecutionSource>>,
#[serde(rename = "mode")]
pub mode: models::ExecutionMode,
}
impl ExecutionSummary {
/// The processed executions that match the request criteria. The `items` array is empty if there are no matching executions.
pub fn new(created_at: chrono::DateTime<chrono::FixedOffset>, updated_at: chrono::DateTime<chrono::FixedOffset>, execution_id: String, status: models::ExecutionStatus, direction: models::Direction, mode: models::ExecutionMode) -> ExecutionSummary {
ExecutionSummary {
created_at,
updated_at,
execution_id,
status,
direction,
transaction_count: None,
fault_count: None,
fault_code: None,
fault_message: None,
file_type: None,
retryable: None,
parent_execution_id: None,
child_execution_id: None,
partnership_id: None,
connection_type: None,
connection_id: None,
source: None,
mode,
}
}
}