Skip to main content

amazon_spapi/models/app_integrations_2024_04_01/
delete_notifications_request.rs

1/*
2 * The Selling Partner API for third party application integrations.
3 *
4 * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
5 *
6 * The version of the OpenAPI document: 2024-04-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DeleteNotificationsRequest : The request for the `deleteNotifications` operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DeleteNotificationsRequest {
17    /// The unique identifier of the notification template you used to onboard your application.
18    #[serde(rename = "templateId")]
19    pub template_id: String,
20    /// The unique identifier that maps each notification status to a reason code.
21    #[serde(rename = "deletionReason")]
22    pub deletion_reason: DeletionReason,
23}
24
25impl DeleteNotificationsRequest {
26    /// The request for the `deleteNotifications` operation.
27    pub fn new(template_id: String, deletion_reason: DeletionReason) -> DeleteNotificationsRequest {
28        DeleteNotificationsRequest {
29            template_id,
30            deletion_reason,
31        }
32    }
33}
34/// The unique identifier that maps each notification status to a reason code.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum DeletionReason {
37    #[serde(rename = "INCORRECT_CONTENT")]
38    IncorrectContent,
39    #[serde(rename = "INCORRECT_RECIPIENT")]
40    IncorrectRecipient,
41}
42
43impl Default for DeletionReason {
44    fn default() -> DeletionReason {
45        Self::IncorrectContent
46    }
47}
48