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};

/// ItemReviewSubtopic : Details of the subtopic for an item review topic.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ItemReviewSubtopic {
    /// The name of the subtopic.
    #[serde(rename = "subtopic")]
    pub subtopic: String,
    #[serde(rename = "metrics")]
    pub metrics: Box<models::customer_feedback_2024_06_01::ItemReviewSubtopicMetrics>,
    /// A list of up to three snippets from reviews that contain the subtopic. 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 ItemReviewSubtopic {
    /// Details of the subtopic for an item review topic.
    pub fn new(subtopic: String, metrics: models::customer_feedback_2024_06_01::ItemReviewSubtopicMetrics) -> ItemReviewSubtopic {
        ItemReviewSubtopic {
            subtopic,
            metrics: Box::new(metrics),
            review_snippets: None,
        }
    }
}