amazon_spapi/models/messaging/get_schema_response.rs
1/*
2 * Selling Partner API for Messaging
3 *
4 * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
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/// GetSchemaResponse : The `GET` request schema response.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GetSchemaResponse {
17 #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
18 pub _links: Option<Box<models::messaging::GetSchemaResponseLinks>>,
19 /// A JSON schema document describing the expected payload of the action. This object can be validated against <a href=http://json-schema.org/draft-04/schema>http://json-schema.org/draft-04/schema</a>.
20 #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
21 pub payload: Option<std::collections::HashMap<String, serde_json::Value>>,
22 /// A list of error responses returned when a request is unsuccessful.
23 #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
24 pub errors: Option<Vec<models::messaging::Error>>,
25}
26
27impl GetSchemaResponse {
28 /// The `GET` request schema response.
29 pub fn new() -> GetSchemaResponse {
30 GetSchemaResponse {
31 _links: None,
32 payload: None,
33 errors: None,
34 }
35 }
36}
37