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
/*
* Selling Partner API for Reports
*
* The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses.
*
* The version of the OpenAPI document: 2021-06-30
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Report : Detailed information about the report.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Report {
/// A list of marketplace identifiers for the report.
#[serde(rename = "marketplaceIds", skip_serializing_if = "Option::is_none")]
pub marketplace_ids: Option<Vec<String>>,
/// The identifier for the report. This identifier is unique only in combination with a seller ID.
#[serde(rename = "reportId")]
pub report_id: String,
/// The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
#[serde(rename = "reportType")]
pub report_type: String,
/// The start of a date and time range used for selecting the data to report.
#[serde(rename = "dataStartTime", skip_serializing_if = "Option::is_none")]
pub data_start_time: Option<String>,
/// The end of a date and time range used for selecting the data to report.
#[serde(rename = "dataEndTime", skip_serializing_if = "Option::is_none")]
pub data_end_time: Option<String>,
/// The identifier of the report schedule that created this report (if any). This identifier is unique only in combination with a seller ID.
#[serde(rename = "reportScheduleId", skip_serializing_if = "Option::is_none")]
pub report_schedule_id: Option<String>,
/// The date and time when the report was created.
#[serde(rename = "createdTime")]
pub created_time: String,
/// The processing status of the report.
#[serde(rename = "processingStatus")]
pub processing_status: ProcessingStatus,
/// The date and time when the report processing started, in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> date time format.
#[serde(rename = "processingStartTime", skip_serializing_if = "Option::is_none")]
pub processing_start_time: Option<String>,
/// The date and time when the report processing completed, in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> date time format.
#[serde(rename = "processingEndTime", skip_serializing_if = "Option::is_none")]
pub processing_end_time: Option<String>,
/// The identifier for the report document. Pass this into the `getReportDocument` operation to get the information you will need to retrieve the report document's contents.
#[serde(rename = "reportDocumentId", skip_serializing_if = "Option::is_none")]
pub report_document_id: Option<String>,
}
impl Report {
/// Detailed information about the report.
pub fn new(report_id: String, report_type: String, created_time: String, processing_status: ProcessingStatus) -> Report {
Report {
marketplace_ids: None,
report_id,
report_type,
data_start_time: None,
data_end_time: None,
report_schedule_id: None,
created_time,
processing_status,
processing_start_time: None,
processing_end_time: None,
report_document_id: None,
}
}
}
/// The processing status of the report.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProcessingStatus {
#[serde(rename = "CANCELLED")]
Cancelled,
#[serde(rename = "DONE")]
Done,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "IN_PROGRESS")]
InProgress,
#[serde(rename = "IN_QUEUE")]
InQueue,
}
impl Default for ProcessingStatus {
fn default() -> ProcessingStatus {
Self::Cancelled
}
}