amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for CustomerFeedback
 *
 * The Selling Partner API for Customer Feedback (Customer Feedback API) provides information about customer reviews and returns at both the item and browse node level.
 *
 * The version of the OpenAPI document: 2024-06-01
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// BrowseNodeSubtopic : The browse node review subtopic.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BrowseNodeSubtopic {
    /// The name of the browse node review subtopic.
    #[serde(rename = "subtopic")]
    pub subtopic: String,
    #[serde(rename = "metrics")]
    pub metrics: Box<models::customer_feedback_2024_06_01::BrowseNodeReviewSubtopicMetrics>,
    /// A list of up to three snippets from reviews that contain the topic. This value is `null` if there aren't enough review snippets for the subtopic.
    #[serde(rename = "reviewSnippets", skip_serializing_if = "Option::is_none")]
    pub review_snippets: Option<Vec<String>>,
}

impl BrowseNodeSubtopic {
    /// The browse node review subtopic.
    pub fn new(subtopic: String, metrics: models::customer_feedback_2024_06_01::BrowseNodeReviewSubtopicMetrics) -> BrowseNodeSubtopic {
        BrowseNodeSubtopic {
            subtopic,
            metrics: Box::new(metrics),
            review_snippets: None,
        }
    }
}