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
/*
 * Selling Partner API for Listings Items
 *
 * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listing Items API Use Case Guide](doc:listings-items-api-v2020-09-01-use-case-guide).
 *
 * The version of the OpenAPI document: 2020-09-01
 * 
 * Generated by: https://openapi-generator.tech
 */

/// ListingsItemSubmissionResponse : Response containing the results of a submission to the Selling Partner API for Listings Items.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ListingsItemSubmissionResponse {
    /// A selling partner provided identifier for an Amazon listing.
    #[serde(default, rename = "sku")]
    pub sku: String,
    /// The status of the listings item submission.
    #[serde(default, rename = "status")]
    pub status: Status,
    /// The unique identifier of the listings item submission.
    #[serde(default, rename = "submissionId")]
    pub submission_id: String,
    /// Listings item issues related to the listings item submission.
    #[serde(default, rename = "issues", skip_serializing_if = "Option::is_none")]
    pub issues: Option<Vec<crate::models::Issue>>,
}

impl ListingsItemSubmissionResponse {
    /// Response containing the results of a submission to the Selling Partner API for Listings Items.
    pub fn new(sku: String, status: Status, submission_id: String) -> ListingsItemSubmissionResponse {
        ListingsItemSubmissionResponse {
            sku,
            status,
            submission_id,
            issues: None,
        }
    }
}

/// The status of the listings item submission.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "ACCEPTED")]
    ACCEPTED,
    #[serde(rename = "INVALID")]
    INVALID,
}

impl Default for Status {
    fn default() -> Status {
        Self::ACCEPTED
    }
}