/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetGoogleBusinessReviews200ResponseReviewsInner {
    /// Review ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Full resource name
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "reviewer", skip_serializing_if = "Option::is_none")]
    pub reviewer: Option<Box<models::GetGoogleBusinessReviews200ResponseReviewsInnerReviewer>>,
    /// Numeric star rating
    #[serde(rename = "rating", skip_serializing_if = "Option::is_none")]
    pub rating: Option<i32>,
    /// Google's string rating
    #[serde(rename = "starRating", skip_serializing_if = "Option::is_none")]
    pub star_rating: Option<StarRating>,
    /// Review text
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
    pub create_time: Option<String>,
    #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    #[serde(rename = "reviewReply", skip_serializing_if = "Option::is_none")]
    pub review_reply:
        Option<Box<models::GetGoogleBusinessReviews200ResponseReviewsInnerReviewReply>>,
}

impl GetGoogleBusinessReviews200ResponseReviewsInner {
    pub fn new() -> GetGoogleBusinessReviews200ResponseReviewsInner {
        GetGoogleBusinessReviews200ResponseReviewsInner {
            id: None,
            name: None,
            reviewer: None,
            rating: None,
            star_rating: None,
            comment: None,
            create_time: None,
            update_time: None,
            review_reply: None,
        }
    }
}
/// Google's string rating
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StarRating {
    #[serde(rename = "ONE")]
    One,
    #[serde(rename = "TWO")]
    Two,
    #[serde(rename = "THREE")]
    Three,
    #[serde(rename = "FOUR")]
    Four,
    #[serde(rename = "FIVE")]
    Five,
}

impl Default for StarRating {
    fn default() -> StarRating {
        Self::One
    }
}
