#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::collection::RecordError;
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::uri::{RecordUri, UriError};
use jacquard_common::types::value::Data;
use jacquard_common::xrpc::XrpcResp;
use jacquard_derive::{IntoStatic, lexicon};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
use crate::net_anisota::beta::game::collection;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
rename = "net.anisota.beta.game.collection",
tag = "$type",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Collection<S: BosStr = DefaultStr> {
pub acquired_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
pub common_name: Option<S>,
pub created_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
pub family: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub genus: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub last_seen: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub log_record_uri: Option<S>,
pub quantity: i64,
#[serde(skip_serializing_if = "Option::is_none")]
pub rarity: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scientific_name: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub source_details: Option<collection::SourceDetails<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub species: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub specimen_data: Option<collection::SpecimenData<S>>,
pub specimen_id: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct CollectionGetRecordOutput<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub cid: Option<Cid<S>>,
pub uri: AtUri<S>,
pub value: Collection<S>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct SourceDetails<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub attempts: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub catch_probability: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub game_card_uri: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct SpecimenData<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub authorship: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
impl<S: BosStr> Collection<S> {
pub fn uri(uri: S) -> Result<RecordUri<S, CollectionRecord>, UriError> {
RecordUri::try_from_uri(AtUri::new(uri)?)
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct CollectionRecord;
impl XrpcResp for CollectionRecord {
const NSID: &'static str = "net.anisota.beta.game.collection";
const ENCODING: &'static str = "application/json";
type Output<S: BosStr> = CollectionGetRecordOutput<S>;
type Err = RecordError;
}
impl<S: BosStr> From<CollectionGetRecordOutput<S>> for Collection<S> {
fn from(output: CollectionGetRecordOutput<S>) -> Self {
output.value
}
}
impl<S: BosStr> jacquard_common::types::collection::Collection for Collection<S> {
const NSID: &'static str = "net.anisota.beta.game.collection";
type Record = CollectionRecord;
}
impl jacquard_common::types::collection::Collection for CollectionRecord {
const NSID: &'static str = "net.anisota.beta.game.collection";
type Record = CollectionRecord;
}
impl<S: BosStr> LexiconSchema for Collection<S> {
fn nsid() -> &'static str {
"net.anisota.beta.game.collection"
}
fn def_name() -> &'static str {
"main"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_beta_game_collection()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.common_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 200usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("common_name"),
max: 200usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.family {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("family"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.genus {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("genus"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.quantity;
if *value < 1i64 {
return Err(ConstraintError::Minimum {
path: ValidationPath::from_field("quantity"),
min: 1i64,
actual: *value,
});
}
}
if let Some(ref value) = self.scientific_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 200usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("scientific_name"),
max: 200usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.species {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("species"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.specimen_id;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("specimen_id"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for SourceDetails<S> {
fn nsid() -> &'static str {
"net.anisota.beta.game.collection"
}
fn def_name() -> &'static str {
"sourceDetails"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_beta_game_collection()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for SpecimenData<S> {
fn nsid() -> &'static str {
"net.anisota.beta.game.collection"
}
fn def_name() -> &'static str {
"specimenData"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_beta_game_collection()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
pub mod collection_state {
pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type AcquiredAt;
type SpecimenId;
type Quantity;
type CreatedAt;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type AcquiredAt = Unset;
type SpecimenId = Unset;
type Quantity = Unset;
type CreatedAt = Unset;
}
pub struct SetAcquiredAt<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetAcquiredAt<St> {}
impl<St: State> State for SetAcquiredAt<St> {
type AcquiredAt = Set<members::acquired_at>;
type SpecimenId = St::SpecimenId;
type Quantity = St::Quantity;
type CreatedAt = St::CreatedAt;
}
pub struct SetSpecimenId<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetSpecimenId<St> {}
impl<St: State> State for SetSpecimenId<St> {
type AcquiredAt = St::AcquiredAt;
type SpecimenId = Set<members::specimen_id>;
type Quantity = St::Quantity;
type CreatedAt = St::CreatedAt;
}
pub struct SetQuantity<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetQuantity<St> {}
impl<St: State> State for SetQuantity<St> {
type AcquiredAt = St::AcquiredAt;
type SpecimenId = St::SpecimenId;
type Quantity = Set<members::quantity>;
type CreatedAt = St::CreatedAt;
}
pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
impl<St: State> State for SetCreatedAt<St> {
type AcquiredAt = St::AcquiredAt;
type SpecimenId = St::SpecimenId;
type Quantity = St::Quantity;
type CreatedAt = Set<members::created_at>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct acquired_at(());
pub struct specimen_id(());
pub struct quantity(());
pub struct created_at(());
}
}
pub struct CollectionBuilder<S: BosStr, St: collection_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<Datetime>,
Option<S>,
Option<Datetime>,
Option<S>,
Option<S>,
Option<Datetime>,
Option<Datetime>,
Option<S>,
Option<i64>,
Option<S>,
Option<S>,
Option<S>,
Option<collection::SourceDetails<S>>,
Option<S>,
Option<collection::SpecimenData<S>>,
Option<S>,
Option<S>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> Collection<S> {
pub fn new() -> CollectionBuilder<S, collection_state::Empty> {
CollectionBuilder::new()
}
}
impl<S: BosStr> CollectionBuilder<S, collection_state::Empty> {
pub fn new() -> Self {
CollectionBuilder {
_state: PhantomData,
_fields: (
None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None,
),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> CollectionBuilder<S, St>
where
St: collection_state::State,
St::AcquiredAt: collection_state::IsUnset,
{
pub fn acquired_at(
mut self,
value: impl Into<Datetime>,
) -> CollectionBuilder<S, collection_state::SetAcquiredAt<St>> {
self._fields.0 = Option::Some(value.into());
CollectionBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn common_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_common_name(mut self, value: Option<S>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St> CollectionBuilder<S, St>
where
St: collection_state::State,
St::CreatedAt: collection_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<Datetime>,
) -> CollectionBuilder<S, collection_state::SetCreatedAt<St>> {
self._fields.2 = Option::Some(value.into());
CollectionBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn family(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_family(mut self, value: Option<S>) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn genus(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_genus(mut self, value: Option<S>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn last_modified(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_last_modified(mut self, value: Option<Datetime>) -> Self {
self._fields.5 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn last_seen(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_last_seen(mut self, value: Option<Datetime>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn log_record_uri(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.7 = value.into();
self
}
pub fn maybe_log_record_uri(mut self, value: Option<S>) -> Self {
self._fields.7 = value;
self
}
}
impl<S: BosStr, St> CollectionBuilder<S, St>
where
St: collection_state::State,
St::Quantity: collection_state::IsUnset,
{
pub fn quantity(
mut self,
value: impl Into<i64>,
) -> CollectionBuilder<S, collection_state::SetQuantity<St>> {
self._fields.8 = Option::Some(value.into());
CollectionBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn rarity(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.9 = value.into();
self
}
pub fn maybe_rarity(mut self, value: Option<S>) -> Self {
self._fields.9 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn scientific_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.10 = value.into();
self
}
pub fn maybe_scientific_name(mut self, value: Option<S>) -> Self {
self._fields.10 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn source(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.11 = value.into();
self
}
pub fn maybe_source(mut self, value: Option<S>) -> Self {
self._fields.11 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn source_details(
mut self,
value: impl Into<Option<collection::SourceDetails<S>>>,
) -> Self {
self._fields.12 = value.into();
self
}
pub fn maybe_source_details(mut self, value: Option<collection::SourceDetails<S>>) -> Self {
self._fields.12 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn species(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.13 = value.into();
self
}
pub fn maybe_species(mut self, value: Option<S>) -> Self {
self._fields.13 = value;
self
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn specimen_data(mut self, value: impl Into<Option<collection::SpecimenData<S>>>) -> Self {
self._fields.14 = value.into();
self
}
pub fn maybe_specimen_data(mut self, value: Option<collection::SpecimenData<S>>) -> Self {
self._fields.14 = value;
self
}
}
impl<S: BosStr, St> CollectionBuilder<S, St>
where
St: collection_state::State,
St::SpecimenId: collection_state::IsUnset,
{
pub fn specimen_id(
mut self,
value: impl Into<S>,
) -> CollectionBuilder<S, collection_state::SetSpecimenId<St>> {
self._fields.15 = Option::Some(value.into());
CollectionBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: collection_state::State> CollectionBuilder<S, St> {
pub fn status(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.16 = value.into();
self
}
pub fn maybe_status(mut self, value: Option<S>) -> Self {
self._fields.16 = value;
self
}
}
impl<S: BosStr, St> CollectionBuilder<S, St>
where
St: collection_state::State,
St::AcquiredAt: collection_state::IsSet,
St::SpecimenId: collection_state::IsSet,
St::Quantity: collection_state::IsSet,
St::CreatedAt: collection_state::IsSet,
{
pub fn build(self) -> Collection<S> {
Collection {
acquired_at: self._fields.0.unwrap(),
common_name: self._fields.1,
created_at: self._fields.2.unwrap(),
family: self._fields.3,
genus: self._fields.4,
last_modified: self._fields.5,
last_seen: self._fields.6,
log_record_uri: self._fields.7,
quantity: self._fields.8.unwrap(),
rarity: self._fields.9,
scientific_name: self._fields.10,
source: self._fields.11,
source_details: self._fields.12,
species: self._fields.13,
specimen_data: self._fields.14,
specimen_id: self._fields.15.unwrap(),
status: self._fields.16,
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Collection<S> {
Collection {
acquired_at: self._fields.0.unwrap(),
common_name: self._fields.1,
created_at: self._fields.2.unwrap(),
family: self._fields.3,
genus: self._fields.4,
last_modified: self._fields.5,
last_seen: self._fields.6,
log_record_uri: self._fields.7,
quantity: self._fields.8.unwrap(),
rarity: self._fields.9,
scientific_name: self._fields.10,
source: self._fields.11,
source_details: self._fields.12,
species: self._fields.13,
specimen_data: self._fields.14,
specimen_id: self._fields.15.unwrap(),
status: self._fields.16,
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_net_anisota_beta_game_collection() -> LexiconDoc<'static> {
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("net.anisota.beta.game.collection"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("main"),
LexUserType::Record(LexRecord {
description: Some(
CowStr::new_static(
"Beta version: Record representing a collected specimen in a player's collection",
),
),
key: Some(CowStr::new_static("tid")),
record: LexRecordRecord::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("specimenId"),
SmolStr::new_static("quantity"),
SmolStr::new_static("acquiredAt"),
SmolStr::new_static("createdAt")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("acquiredAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("When the specimen was first acquired"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("commonName"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Common name of the specimen"),
),
max_length: Some(200usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("When the record was created"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("family"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Taxonomic family")),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("genus"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Taxonomic genus")),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("lastModified"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("When the record was last modified"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("lastSeen"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("When the specimen was last encountered"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("logRecordUri"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"URI of the game.log record that documents the acquisition of this specimen",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quantity"),
LexObjectProperty::Integer(LexInteger {
minimum: Some(1i64),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("rarity"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Rarity level of the specimen"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("scientificName"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Scientific name of the specimen"),
),
max_length: Some(200usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("source"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("How the specimen was acquired"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("sourceDetails"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#sourceDetails"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("species"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Taxonomic species")),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("specimenData"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#specimenData"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("specimenId"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Unique identifier for the specimen"),
),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("status"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Collection status of this specimen"),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("sourceDetails"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static(
"Additional details about how the specimen was acquired",
),
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("attempts"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("catchProbability"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Probability used when catching this specimen (decimal string, e.g. '0.75')",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gameCardUri"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"URI of the game card that provided this specimen",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("location"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Location where specimen was found or observed",
),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("specimenData"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Complete specimen information")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("authorship"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Scientific authorship of the species",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("description"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Detailed description of the specimen",
)),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}