amazon_spapi/models/messaging/attachment.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/// Attachment : Represents a file that was uploaded to a destination that was created by the Uploads API [`createUploadDestinationForResource`](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource) operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Attachment {
17 /// The identifier for the upload destination. To retrieve this value, call the Uploads API [`createUploadDestinationForResource`](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource) operation.
18 #[serde(rename = "uploadDestinationId")]
19 pub upload_destination_id: String,
20 /// The name of the file, including the extension. This is the file name that will appear in the message. This does not need to match the file name of the file that you uploaded.
21 #[serde(rename = "fileName")]
22 pub file_name: String,
23}
24
25impl Attachment {
26 /// Represents a file that was uploaded to a destination that was created by the Uploads API [`createUploadDestinationForResource`](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource) operation.
27 pub fn new(upload_destination_id: String, file_name: String) -> Attachment {
28 Attachment {
29 upload_destination_id,
30 file_name,
31 }
32 }
33}
34