use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EbvPortalDataProviderDefinition {
#[serde(rename = "baseUrl")]
pub base_url: String,
#[serde(rename = "cacheTtl", skip_serializing_if = "Option::is_none")]
pub cache_ttl: Option<i32>,
#[serde(rename = "data")]
pub data: String,
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "overviews")]
pub overviews: String,
#[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub priority: Option<Option<i32>>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl EbvPortalDataProviderDefinition {
pub fn new(base_url: String, data: String, description: String, name: String, overviews: String, r#type: Type) -> EbvPortalDataProviderDefinition {
EbvPortalDataProviderDefinition {
base_url,
cache_ttl: None,
data,
description,
name,
overviews,
priority: None,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "EbvPortal")]
EbvPortal,
}
impl Default for Type {
fn default() -> Type {
Self::EbvPortal
}
}