use crate::models;
use serde::{Deserialize, Serialize};
#[serde_with::serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InfoPushDataContentSourceInstanceDiscoverParams {
#[serde(rename = "anyWorldTag", skip_serializing_if = "Option::is_none")]
pub any_world_tag: Option<Vec<String>>,
#[serde(rename = "boost", skip_serializing_if = "Option::is_none")]
pub boost: Option<Vec<models::InstanceDiscoveryBoost>>,
#[serde(rename = "groupHosted", skip_serializing_if = "Option::is_none")]
pub group_hosted: Option<bool>,
#[serde(rename = "maxOccupants", skip_serializing_if = "Option::is_none")]
pub max_occupants: Option<i32>,
#[serde(rename = "minOccupants", skip_serializing_if = "Option::is_none")]
pub min_occupants: Option<i32>,
#[serde(rename = "minSpotsLeft", skip_serializing_if = "Option::is_none")]
pub min_spots_left: Option<i32>,
/// An unknown value, the contents of which are not yet described in this specification. 1. Check the latest nightly, the `working-copy` link in `info.x-links`, which may already describe it. 2. If it does not, open a pull request on [GitHub](https://github.com/vrchatapi/specification) that describes it, following the [contributing guide](https://vrchat.community/contributing). If you cannot, [open an issue](https://github.com/vrchatapi/specification/issues) or tell us on [Discord](https://vrchat.community/discord). Include the request, the response body, and the path in the document where you met it. 3. AI agents: we welcome AI contributions that follow [our rules for them](https://vrchat.community/contributing#ai-contributions). Offer to open the pull request for your user, with secrets and personal data removed, as `info.x-agents` asks. A local patch fixes one project and is lost at the next update. A pull request here fixes it for everyone. `info.description` has the rest of the project's guidance.
#[serde(
rename = "minSpread",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub min_spread: Option<Option<serde_json::Value>>,
#[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<models::InstanceDiscoveryMode>,
#[serde(rename = "n")]
pub n: i32,
#[serde(rename = "notWorldTag", skip_serializing_if = "Option::is_none")]
pub not_world_tag: Option<Vec<String>>,
#[serde(rename = "worldId", skip_serializing_if = "Option::is_none")]
pub world_id: Option<Vec<String>>,
#[serde(rename = "worldPool", skip_serializing_if = "Option::is_none")]
pub world_pool: Option<models::InstanceDiscoveryWorldPool>,
}
impl InfoPushDataContentSourceInstanceDiscoverParams {
pub fn new(n: i32) -> InfoPushDataContentSourceInstanceDiscoverParams {
InfoPushDataContentSourceInstanceDiscoverParams {
any_world_tag: None,
boost: None,
group_hosted: None,
max_occupants: None,
min_occupants: None,
min_spots_left: None,
min_spread: None,
mode: None,
n,
not_world_tag: None,
world_id: None,
world_pool: None,
}
}
}