Skip to main content

hermes_ebay_sell_inventory/models/
error.rs

1/*
2 * Inventory API
3 *
4 * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
5 *
6 * The version of the OpenAPI document: 1.18.4
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Error : This type is used to express detailed information on errors and warnings that may occur with a call request.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Error {
17    /// This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. 
18    #[serde(rename = "category", skip_serializing_if = "Option::is_none")]
19    pub category: Option<String>,
20    /// The name of the domain in which the error or warning occurred.
21    #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
22    pub domain: Option<String>,
23    /// A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
24    #[serde(rename = "errorId", skip_serializing_if = "Option::is_none")]
25    pub error_id: Option<i32>,
26    /// An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any.
27    #[serde(rename = "inputRefIds", skip_serializing_if = "Option::is_none")]
28    pub input_ref_ids: Option<Vec<String>>,
29    /// A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem.
30    #[serde(rename = "longMessage", skip_serializing_if = "Option::is_none")]
31    pub long_message: Option<String>,
32    /// A description of the condition that caused the error or warning.
33    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
34    pub message: Option<String>,
35    /// An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any.
36    #[serde(rename = "outputRefIds", skip_serializing_if = "Option::is_none")]
37    pub output_ref_ids: Option<Vec<String>>,
38    /// Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning.
39    #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
40    pub parameters: Option<Vec<models::ErrorParameter>>,
41    /// The name of the subdomain in which the error or warning occurred.
42    #[serde(rename = "subdomain", skip_serializing_if = "Option::is_none")]
43    pub subdomain: Option<String>,
44}
45
46impl Error {
47    /// This type is used to express detailed information on errors and warnings that may occur with a call request.
48    pub fn new() -> Error {
49        Error {
50            category: None,
51            domain: None,
52            error_id: None,
53            input_ref_ids: None,
54            long_message: None,
55            message: None,
56            output_ref_ids: None,
57            parameters: None,
58            subdomain: None,
59        }
60    }
61}
62