/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.128.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// GoogleBusinessReview : A Google Business Profile review, as returned by every gmb-reviews read endpoint.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GoogleBusinessReview {
/// 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::GoogleBusinessReviewReviewer>>,
/// Numeric star rating (0 when Google sends no 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::GoogleBusinessReviewReviewReply>>,
/// Number of photos attached to the review (photos only, videos are not counted)
#[serde(rename = "photoCount", skip_serializing_if = "Option::is_none")]
pub photo_count: Option<i32>,
/// Photos attached to the review by the reviewer
#[serde(rename = "photos", skip_serializing_if = "Option::is_none")]
pub photos: Option<Vec<models::ListInboxReviews200ResponseDataInnerPhotosInner>>,
}
impl GoogleBusinessReview {
/// A Google Business Profile review, as returned by every gmb-reviews read endpoint.
pub fn new() -> GoogleBusinessReview {
GoogleBusinessReview {
id: None,
name: None,
reviewer: None,
rating: None,
star_rating: None,
comment: None,
create_time: None,
update_time: None,
review_reply: None,
photo_count: None,
photos: 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
}
}