amazon_spapi/models/notifications/destination.rs
1/*
2 * Selling Partner API for Notifications
3 *
4 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. For more information, refer to the [Notifications Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
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/// Destination : Information about the destination created when you call the `createDestination` operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Destination {
17 /// The developer-defined name for this destination.
18 #[serde(rename = "name")]
19 pub name: String,
20 /// The destination identifier generated when you created the destination.
21 #[serde(rename = "destinationId")]
22 pub destination_id: String,
23 #[serde(rename = "resource")]
24 pub resource: Box<models::notifications::DestinationResource>,
25}
26
27impl Destination {
28 /// Information about the destination created when you call the `createDestination` operation.
29 pub fn new(name: String, destination_id: String, resource: models::notifications::DestinationResource) -> Destination {
30 Destination {
31 name,
32 destination_id,
33 resource: Box::new(resource),
34 }
35 }
36}
37