amazon_spapi/models/fulfillment_inbound_2024_03_20/
operation_problem.rs

1/*
2 * The Selling Partner API for FBA inbound operations.
3 *
4 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
5 *
6 * The version of the OpenAPI document: 2024-03-20
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OperationProblem : A problem with additional properties persisted to an operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OperationProblem {
17    /// An error code that identifies the type of error that occurred.
18    #[serde(rename = "code")]
19    pub code: String,
20    /// Additional details that can help the caller understand or fix the issue.
21    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
22    pub details: Option<String>,
23    /// A message that describes the error condition.
24    #[serde(rename = "message")]
25    pub message: String,
26    /// The severity of the problem. Possible values: `WARNING`, `ERROR`.
27    #[serde(rename = "severity")]
28    pub severity: String,
29}
30
31impl OperationProblem {
32    /// A problem with additional properties persisted to an operation.
33    pub fn new(code: String, message: String, severity: String) -> OperationProblem {
34        OperationProblem {
35            code,
36            details: None,
37            message,
38            severity,
39        }
40    }
41}
42