amazon_spapi/models/app_integrations_2024_04_01/
create_notification_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/// CreateNotificationRequest : The request for the `createNotification` operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateNotificationRequest {
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 dynamic parameters required by the notification templated specified by `templateId`.
21    #[serde(rename = "notificationParameters")]
22    pub notification_parameters: std::collections::HashMap<String, serde_json::Value>,
23    /// An encrypted marketplace identifier for the posted notification.
24    #[serde(rename = "marketplaceId", skip_serializing_if = "Option::is_none")]
25    pub marketplace_id: Option<String>,
26}
27
28impl CreateNotificationRequest {
29    /// The request for the `createNotification` operation.
30    pub fn new(template_id: String, notification_parameters: std::collections::HashMap<String, serde_json::Value>) -> CreateNotificationRequest {
31        CreateNotificationRequest {
32            template_id,
33            notification_parameters,
34            marketplace_id: None,
35        }
36    }
37}
38