/*
* 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.605.0
* 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 Profile {
#[serde(rename = "_id", skip_serializing_if = "Option::is_none")]
pub _id: Option<String>,
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "color", skip_serializing_if = "Option::is_none")]
pub color: Option<String>,
/// IANA timezone new posts on this profile use when the request names no `timezone`. Null means UTC.
#[serde(
rename = "timezone",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub timezone: Option<Option<String>>,
/// Your own identifier for this profile, set on create or update. Null when none is set.
#[serde(
rename = "externalId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub external_id: Option<Option<String>>,
/// This profile's own zero content retention setting. `none` stores identifiers and metadata only for this profile. Change it with `contentRetention` on update; only the team owner can.
#[serde(rename = "contentRetention", skip_serializing_if = "Option::is_none")]
pub content_retention: Option<ContentRetention>,
/// The mode that applies to this profile: `none` when the profile or the whole team uses zero content retention.
#[serde(
rename = "effectiveContentRetention",
skip_serializing_if = "Option::is_none"
)]
pub effective_content_retention: Option<EffectiveContentRetention>,
#[serde(rename = "isDefault", skip_serializing_if = "Option::is_none")]
pub is_default: Option<bool>,
/// Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
#[serde(rename = "isOverLimit", skip_serializing_if = "Option::is_none")]
pub is_over_limit: Option<bool>,
/// In the profile list. Connected accounts on the profile, including ones that need reconnecting; phone and SMS number internals and posting accounts hidden by an ads connect are not counted.
#[serde(rename = "accountCount", skip_serializing_if = "Option::is_none")]
pub account_count: Option<i32>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
impl Profile {
pub fn new() -> Profile {
Profile {
_id: None,
user_id: None,
name: None,
description: None,
color: None,
timezone: None,
external_id: None,
content_retention: None,
effective_content_retention: None,
is_default: None,
is_over_limit: None,
account_count: None,
created_at: None,
}
}
}
/// This profile's own zero content retention setting. `none` stores identifiers and metadata only for this profile. Change it with `contentRetention` on update; only the team owner can.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContentRetention {
#[serde(rename = "standard")]
Standard,
#[serde(rename = "none")]
None,
}
impl Default for ContentRetention {
fn default() -> ContentRetention {
Self::Standard
}
}
/// The mode that applies to this profile: `none` when the profile or the whole team uses zero content retention.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EffectiveContentRetention {
#[serde(rename = "standard")]
Standard,
#[serde(rename = "none")]
None,
}
impl Default for EffectiveContentRetention {
fn default() -> EffectiveContentRetention {
Self::Standard
}
}