/*
* 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.456.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 CreatorCampaignCaps {
/// Invites and joins past this count answer 403.
#[serde(rename = "maxParticipants", skip_serializing_if = "Option::is_none")]
pub max_participants: Option<i32>,
/// Posts one participant can submit to this campaign per UTC day, counting every submission whatever its status. The next submit that day answers 409 invalid_resource_state.
#[serde(
rename = "maxSubmissionsPerParticipantPerDay",
skip_serializing_if = "Option::is_none"
)]
pub max_submissions_per_participant_per_day: Option<i32>,
/// Accounts a participant can use in this campaign. Connecting a new account past it answers 400; only the first accounts connected, up to this count, can submit posts.
#[serde(
rename = "maxAccountsPerParticipant",
skip_serializing_if = "Option::is_none"
)]
pub max_accounts_per_participant: Option<i32>,
/// X campaigns only: what tracking X posts may cost in X reads, in cents. Unset means 5000 ($50). X bills one read per tracked post per UTC day, and you pay it at cost through usage-based billing. When it is spent, open X posts stop counting views and are flagged `x_read_cap`, and new X posts answer 409.
#[serde(rename = "maxXReadSpendCents", skip_serializing_if = "Option::is_none")]
pub max_x_read_spend_cents: Option<i32>,
/// A submission whose authenticity score falls below this is flagged `low_authenticity`. It is never rejected automatically. Defaults to 40 on create.
#[serde(rename = "authenticityThreshold")]
pub authenticity_threshold: f64,
}
impl CreatorCampaignCaps {
pub fn new(authenticity_threshold: f64) -> CreatorCampaignCaps {
CreatorCampaignCaps {
max_participants: None,
max_submissions_per_participant_per_day: None,
max_accounts_per_participant: None,
max_x_read_spend_cents: None,
authenticity_threshold,
}
}
}