amazon_spapi/models/services/
warning.rs

1/*
2 * Selling Partner API for Services
3 *
4 * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Warning : Warning returned when the request is successful, but there are important callouts based on which API clients should take defined actions.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Warning {
17    /// An warning code that identifies the type of warning that occurred.
18    #[serde(rename = "code")]
19    pub code: String,
20    /// A message that describes the warning condition in a human-readable form.
21    #[serde(rename = "message")]
22    pub message: String,
23    /// Additional details that can help the caller understand or address the warning.
24    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
25    pub details: Option<String>,
26}
27
28impl Warning {
29    /// Warning returned when the request is successful, but there are important callouts based on which API clients should take defined actions.
30    pub fn new(code: String, message: String) -> Warning {
31        Warning {
32            code,
33            message,
34            details: None,
35        }
36    }
37}
38