/*
* 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).
*
* The version of the OpenAPI document: 1.9.2
* 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 BatchGetGoogleBusinessReviewsRequest {
/// Array of full location resource names (e.g. ['accounts/123/locations/456']). Max 50 per request (Google's batchGetReviews cap); chunk larger sets into multiple requests.
#[serde(rename = "locationNames")]
pub location_names: Vec<String>,
/// Number of reviews per page (max 50)
#[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")]
pub page_size: Option<i32>,
/// Pagination token from previous response
#[serde(rename = "pageToken", skip_serializing_if = "Option::is_none")]
pub page_token: Option<String>,
/// Sort order requested from Google. Defaults to 'updateTime desc' (newest first), which allows early-stopping pagination once results cross your date window.
#[serde(rename = "orderBy", skip_serializing_if = "Option::is_none")]
pub order_by: Option<OrderBy>,
}
impl BatchGetGoogleBusinessReviewsRequest {
pub fn new(location_names: Vec<String>) -> BatchGetGoogleBusinessReviewsRequest {
BatchGetGoogleBusinessReviewsRequest {
location_names,
page_size: None,
page_token: None,
order_by: None,
}
}
}
/// Sort order requested from Google. Defaults to 'updateTime desc' (newest first), which allows early-stopping pagination once results cross your date window.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrderBy {
#[serde(rename = "updateTime desc")]
UpdateTimeDesc,
#[serde(rename = "rating")]
Rating,
#[serde(rename = "rating desc")]
RatingDesc,
}
impl Default for OrderBy {
fn default() -> OrderBy {
Self::UpdateTimeDesc
}
}