late/models/google_business_platform_data.rs
1/*
2 * Zernio API
3 *
4 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5 *
6 * The version of the OpenAPI document: 1.0.1
7 * Contact: support@zernio.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GoogleBusinessPlatformData : Text and single image only (no videos). Supports STANDARD, EVENT, OFFER, and ALERT post types. Posts appear on GBP, Google Search, and Maps. Use locationId for multi-location posting. Schedule dates accept both ISO 8601 strings (e.g. '2026-04-15T09:00:00Z') and Google's native {year, month, day} objects.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GoogleBusinessPlatformData {
17 /// Target GBP location ID (e.g. \"locations/123456789\"). If omitted, uses the default location. Use GET /v1/accounts/{id}/gmb-locations to list locations.
18 #[serde(rename = "locationId", skip_serializing_if = "Option::is_none")]
19 pub location_id: Option<String>,
20 /// BCP 47 language code (e.g. \"en\", \"de\", \"es\"). Auto-detected if omitted. Set explicitly for short or mixed-language posts.
21 #[serde(rename = "languageCode", skip_serializing_if = "Option::is_none")]
22 pub language_code: Option<String>,
23 /// Post type. STANDARD is a regular update. EVENT requires the event object. OFFER requires the offer object. Defaults to STANDARD if omitted.
24 #[serde(rename = "topicType", skip_serializing_if = "Option::is_none")]
25 pub topic_type: Option<TopicType>,
26 #[serde(rename = "callToAction", skip_serializing_if = "Option::is_none")]
27 pub call_to_action: Option<Box<models::GoogleBusinessPlatformDataCallToAction>>,
28 #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
29 pub event: Option<Box<models::GoogleBusinessPlatformDataEvent>>,
30 #[serde(rename = "offer", skip_serializing_if = "Option::is_none")]
31 pub offer: Option<Box<models::GoogleBusinessPlatformDataOffer>>,
32}
33
34impl GoogleBusinessPlatformData {
35 /// Text and single image only (no videos). Supports STANDARD, EVENT, OFFER, and ALERT post types. Posts appear on GBP, Google Search, and Maps. Use locationId for multi-location posting. Schedule dates accept both ISO 8601 strings (e.g. '2026-04-15T09:00:00Z') and Google's native {year, month, day} objects.
36 pub fn new() -> GoogleBusinessPlatformData {
37 GoogleBusinessPlatformData {
38 location_id: None,
39 language_code: None,
40 topic_type: None,
41 call_to_action: None,
42 event: None,
43 offer: None,
44 }
45 }
46}
47/// Post type. STANDARD is a regular update. EVENT requires the event object. OFFER requires the offer object. Defaults to STANDARD if omitted.
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum TopicType {
50 #[serde(rename = "STANDARD")]
51 Standard,
52 #[serde(rename = "EVENT")]
53 Event,
54 #[serde(rename = "OFFER")]
55 Offer,
56}
57
58impl Default for TopicType {
59 fn default() -> TopicType {
60 Self::Standard
61 }
62}