pub mod actor;
pub mod claim;
pub mod claim_review;
pub mod collection;
pub mod create_claim;
pub mod create_game;
pub mod engine;
pub mod feed;
pub mod game;
pub mod get_claim;
pub mod get_game;
pub mod get_profile;
pub mod get_reviews;
pub mod graph;
pub mod list_claims;
pub mod list_games;
pub mod list_org_games;
pub mod migrate_claim;
pub mod org;
pub mod platform;
pub mod platform_family;
pub mod put_game;
pub mod redirect;
pub mod review_claim;
pub mod richtext;
pub mod search;
pub mod search_profiles_typeahead;
pub mod search_slugs;
pub mod slug;
#[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::blob::BlobRef;
use jacquard_common::types::string::{AtUri, Datetime, Did, UriValue};
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
use crate::app_bsky::richtext::facet::Facet;
use crate::games_gamesgamesgamesgames;
#[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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ActorCreditView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub actor_uri: Option<AtUri<S>>,
pub credits: Vec<games_gamesgamesgamesgames::CreditEntry<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
pub uri: AtUri<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ActorProfileDetailView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<BlobRef<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description_facets: Option<Vec<Facet<S>>>,
pub did: Did<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pronouns: Option<S>,
pub uri: AtUri<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub websites: Option<Vec<games_gamesgamesgamesgames::Website<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ActorProfileSummaryView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<BlobRef<S>>,
pub did: Did<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
pub uri: AtUri<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 AgeRating<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub content_descriptors: Option<Vec<S>>,
pub organization: AgeRatingOrganization<S>,
pub rating: S,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum AgeRatingOrganization<S: BosStr = DefaultStr> {
Esrb,
Pegi,
Cero,
Usk,
Grac,
ClassInd,
Acb,
Other(S),
}
impl<S: BosStr> AgeRatingOrganization<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Esrb => "esrb",
Self::Pegi => "pegi",
Self::Cero => "cero",
Self::Usk => "usk",
Self::Grac => "grac",
Self::ClassInd => "classInd",
Self::Acb => "acb",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"esrb" => Self::Esrb,
"pegi" => Self::Pegi,
"cero" => Self::Cero,
"usk" => Self::Usk,
"grac" => Self::Grac,
"classInd" => Self::ClassInd,
"acb" => Self::Acb,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for AgeRatingOrganization<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for AgeRatingOrganization<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for AgeRatingOrganization<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for AgeRatingOrganization<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for AgeRatingOrganization<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for AgeRatingOrganization<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = AgeRatingOrganization<S::Output>;
fn into_static(self) -> Self::Output {
match self {
AgeRatingOrganization::Esrb => AgeRatingOrganization::Esrb,
AgeRatingOrganization::Pegi => AgeRatingOrganization::Pegi,
AgeRatingOrganization::Cero => AgeRatingOrganization::Cero,
AgeRatingOrganization::Usk => AgeRatingOrganization::Usk,
AgeRatingOrganization::Grac => AgeRatingOrganization::Grac,
AgeRatingOrganization::ClassInd => AgeRatingOrganization::ClassInd,
AgeRatingOrganization::Acb => AgeRatingOrganization::Acb,
AgeRatingOrganization::Other(v) => AgeRatingOrganization::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct AlternativeName<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub locale: Option<S>,
pub name: S,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
pub type ApplicationType<S = DefaultStr> = S;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct CollectionSummaryView<S: BosStr = DefaultStr> {
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub r#type: Option<CollectionSummaryViewType<S>>,
pub uri: AtUri<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CollectionSummaryViewType<S: BosStr = DefaultStr> {
Franchise,
Series,
Curated,
Other(S),
}
impl<S: BosStr> CollectionSummaryViewType<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Franchise => "franchise",
Self::Series => "series",
Self::Curated => "curated",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"franchise" => Self::Franchise,
"series" => Self::Series,
"curated" => Self::Curated,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for CollectionSummaryViewType<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for CollectionSummaryViewType<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for CollectionSummaryViewType<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for CollectionSummaryViewType<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for CollectionSummaryViewType<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for CollectionSummaryViewType<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = CollectionSummaryViewType<S::Output>;
fn into_static(self) -> Self::Output {
match self {
CollectionSummaryViewType::Franchise => CollectionSummaryViewType::Franchise,
CollectionSummaryViewType::Series => CollectionSummaryViewType::Series,
CollectionSummaryViewType::Curated => CollectionSummaryViewType::Curated,
CollectionSummaryViewType::Other(v) => {
CollectionSummaryViewType::Other(v.into_static())
}
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CompanyRole<S: BosStr = DefaultStr> {
Developer,
Publisher,
Porter,
Supporter,
Other(S),
}
impl<S: BosStr> CompanyRole<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Developer => "developer",
Self::Publisher => "publisher",
Self::Porter => "porter",
Self::Supporter => "supporter",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"developer" => Self::Developer,
"publisher" => Self::Publisher,
"porter" => Self::Porter,
"supporter" => Self::Supporter,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for CompanyRole<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for CompanyRole<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for CompanyRole<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for CompanyRole<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for CompanyRole<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = CompanyRole<S::Output>;
fn into_static(self) -> Self::Output {
match self {
CompanyRole::Developer => CompanyRole::Developer,
CompanyRole::Publisher => CompanyRole::Publisher,
CompanyRole::Porter => CompanyRole::Porter,
CompanyRole::Supporter => CompanyRole::Supporter,
CompanyRole::Other(v) => CompanyRole::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct CreditEntry<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub department: Option<S>,
pub role: games_gamesgamesgamesgames::IndividualRole<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct EngineSummaryView<S: BosStr = DefaultStr> {
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
pub uri: AtUri<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 ExternalIds<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub apple_app_store: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub epic_games: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub gog: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub google_play: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub humble_bundle: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub igdb: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub itch_io: Option<games_gamesgamesgamesgames::ItchIoId<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub nintendo_eshop: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub play_station: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub steam: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub twitch: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub xbox: 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 ExternalVideo<S: BosStr = DefaultStr> {
pub platform: ExternalVideoPlatform<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<S>,
pub video_id: S,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ExternalVideoPlatform<S: BosStr = DefaultStr> {
Youtube,
Twitch,
Vimeo,
Other(S),
}
impl<S: BosStr> ExternalVideoPlatform<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Youtube => "youtube",
Self::Twitch => "twitch",
Self::Vimeo => "vimeo",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"youtube" => Self::Youtube,
"twitch" => Self::Twitch,
"vimeo" => Self::Vimeo,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for ExternalVideoPlatform<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for ExternalVideoPlatform<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for ExternalVideoPlatform<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ExternalVideoPlatform<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for ExternalVideoPlatform<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for ExternalVideoPlatform<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = ExternalVideoPlatform<S::Output>;
fn into_static(self) -> Self::Output {
match self {
ExternalVideoPlatform::Youtube => ExternalVideoPlatform::Youtube,
ExternalVideoPlatform::Twitch => ExternalVideoPlatform::Twitch,
ExternalVideoPlatform::Vimeo => ExternalVideoPlatform::Vimeo,
ExternalVideoPlatform::Other(v) => ExternalVideoPlatform::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct GameDetailView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub actor_credits: Option<Vec<games_gamesgamesgamesgames::ActorCreditView<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub age_ratings: Option<Vec<games_gamesgamesgamesgames::AgeRating<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub alternative_names: Option<Vec<games_gamesgamesgamesgames::AlternativeName<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub application_type: Option<games_gamesgamesgamesgames::ApplicationType<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub collections: Option<Vec<AtUri<S>>>,
pub created_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
pub engines: Option<Vec<AtUri<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub external_ids: Option<games_gamesgamesgamesgames::ExternalIds<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub genres: Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub keywords: Option<Vec<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub language_supports: Option<Vec<games_gamesgamesgamesgames::LanguageSupport<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub modes: Option<Vec<games_gamesgamesgamesgames::Mode<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub multiplayer_modes: Option<Vec<games_gamesgamesgamesgames::MultiplayerMode<S>>>,
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub org_credits: Option<Vec<games_gamesgamesgamesgames::OrgCreditView<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub parent: Option<AtUri<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub player_perspectives: Option<Vec<games_gamesgamesgamesgames::PlayerPerspective<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub published_at: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub releases: Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub storyline: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub themes: Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_to_beat: Option<games_gamesgamesgamesgames::TimeToBeat<S>>,
pub uri: AtUri<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub videos: Option<Vec<games_gamesgamesgamesgames::ExternalVideo<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub websites: Option<Vec<games_gamesgamesgamesgames::Website<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct GameFeedViewItem<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub feed_context: Option<S>,
pub game: games_gamesgamesgamesgames::GameView<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct GameSummaryView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub application_type: Option<games_gamesgamesgamesgames::ApplicationType<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub first_release_date: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option<S>,
pub uri: AtUri<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct GameView<S: BosStr = DefaultStr> {
pub application_type: games_gamesgamesgamesgames::ApplicationType<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub genres: Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub like_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub releases: Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub themes: Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
pub uri: AtUri<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub viewer: Option<games_gamesgamesgamesgames::ViewerState<S>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Genre<S: BosStr = DefaultStr> {
Fighting,
Music,
Platform,
PointAndClick,
Puzzle,
Racing,
Rpg,
Rts,
Shooter,
Simulator,
Other(S),
}
impl<S: BosStr> Genre<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Fighting => "fighting",
Self::Music => "music",
Self::Platform => "platform",
Self::PointAndClick => "pointAndClick",
Self::Puzzle => "puzzle",
Self::Racing => "racing",
Self::Rpg => "rpg",
Self::Rts => "rts",
Self::Shooter => "shooter",
Self::Simulator => "simulator",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"fighting" => Self::Fighting,
"music" => Self::Music,
"platform" => Self::Platform,
"pointAndClick" => Self::PointAndClick,
"puzzle" => Self::Puzzle,
"racing" => Self::Racing,
"rpg" => Self::Rpg,
"rts" => Self::Rts,
"shooter" => Self::Shooter,
"simulator" => Self::Simulator,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for Genre<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for Genre<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for Genre<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for Genre<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for Genre<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = Genre<S::Output>;
fn into_static(self) -> Self::Output {
match self {
Genre::Fighting => Genre::Fighting,
Genre::Music => Genre::Music,
Genre::Platform => Genre::Platform,
Genre::PointAndClick => Genre::PointAndClick,
Genre::Puzzle => Genre::Puzzle,
Genre::Racing => Genre::Racing,
Genre::Rpg => Genre::Rpg,
Genre::Rts => Genre::Rts,
Genre::Shooter => Genre::Shooter,
Genre::Simulator => Genre::Simulator,
Genre::Other(v) => Genre::Other(v.into_static()),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum IndividualRole<S: BosStr = DefaultStr> {
Director,
Producer,
Designer,
Programmer,
Artist,
Animator,
Writer,
Composer,
SoundDesigner,
VoiceActor,
Qa,
Localization,
CommunityManager,
Marketing,
Other(S),
}
impl<S: BosStr> IndividualRole<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Director => "director",
Self::Producer => "producer",
Self::Designer => "designer",
Self::Programmer => "programmer",
Self::Artist => "artist",
Self::Animator => "animator",
Self::Writer => "writer",
Self::Composer => "composer",
Self::SoundDesigner => "soundDesigner",
Self::VoiceActor => "voiceActor",
Self::Qa => "qa",
Self::Localization => "localization",
Self::CommunityManager => "communityManager",
Self::Marketing => "marketing",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"director" => Self::Director,
"producer" => Self::Producer,
"designer" => Self::Designer,
"programmer" => Self::Programmer,
"artist" => Self::Artist,
"animator" => Self::Animator,
"writer" => Self::Writer,
"composer" => Self::Composer,
"soundDesigner" => Self::SoundDesigner,
"voiceActor" => Self::VoiceActor,
"qa" => Self::Qa,
"localization" => Self::Localization,
"communityManager" => Self::CommunityManager,
"marketing" => Self::Marketing,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for IndividualRole<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for IndividualRole<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for IndividualRole<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for IndividualRole<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for IndividualRole<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = IndividualRole<S::Output>;
fn into_static(self) -> Self::Output {
match self {
IndividualRole::Director => IndividualRole::Director,
IndividualRole::Producer => IndividualRole::Producer,
IndividualRole::Designer => IndividualRole::Designer,
IndividualRole::Programmer => IndividualRole::Programmer,
IndividualRole::Artist => IndividualRole::Artist,
IndividualRole::Animator => IndividualRole::Animator,
IndividualRole::Writer => IndividualRole::Writer,
IndividualRole::Composer => IndividualRole::Composer,
IndividualRole::SoundDesigner => IndividualRole::SoundDesigner,
IndividualRole::VoiceActor => IndividualRole::VoiceActor,
IndividualRole::Qa => IndividualRole::Qa,
IndividualRole::Localization => IndividualRole::Localization,
IndividualRole::CommunityManager => IndividualRole::CommunityManager,
IndividualRole::Marketing => IndividualRole::Marketing,
IndividualRole::Other(v) => IndividualRole::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ItchIoId<S: BosStr = DefaultStr> {
pub developer: S,
pub game: 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 LanguageSupport<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub audio: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub interface: Option<bool>,
pub language: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub subtitles: Option<bool>,
#[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 MediaItem<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub blob: Option<BlobRef<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub height: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub locale: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media_type: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub width: Option<i64>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Mode<S: BosStr = DefaultStr> {
BattleRoyale,
Cooperative,
Mmo,
Multiplayer,
SinglePlayer,
SplitScreen,
Other(S),
}
impl<S: BosStr> Mode<S> {
pub fn as_str(&self) -> &str {
match self {
Self::BattleRoyale => "battleRoyale",
Self::Cooperative => "cooperative",
Self::Mmo => "mmo",
Self::Multiplayer => "multiplayer",
Self::SinglePlayer => "singlePlayer",
Self::SplitScreen => "splitScreen",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"battleRoyale" => Self::BattleRoyale,
"cooperative" => Self::Cooperative,
"mmo" => Self::Mmo,
"multiplayer" => Self::Multiplayer,
"singlePlayer" => Self::SinglePlayer,
"splitScreen" => Self::SplitScreen,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for Mode<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for Mode<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for Mode<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for Mode<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for Mode<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = Mode<S::Output>;
fn into_static(self) -> Self::Output {
match self {
Mode::BattleRoyale => Mode::BattleRoyale,
Mode::Cooperative => Mode::Cooperative,
Mode::Mmo => Mode::Mmo,
Mode::Multiplayer => Mode::Multiplayer,
Mode::SinglePlayer => Mode::SinglePlayer,
Mode::SplitScreen => Mode::SplitScreen,
Mode::Other(v) => Mode::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct MultiplayerMode<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub has_campaign_coop: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub has_drop_in: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub has_lan_coop: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub has_splitscreen: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub has_splitscreen_online: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub offline_coop_max: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub offline_max: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub online_coop_max: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub online_max: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: 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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct OrgCreditView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub org_uri: Option<AtUri<S>>,
pub roles: Vec<games_gamesgamesgamesgames::CompanyRole<S>>,
pub uri: AtUri<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct OrgProfileDetailView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<BlobRef<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description_facets: Option<Vec<Facet<S>>>,
pub did: Did<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub founded_at: Option<Datetime>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub parent: Option<AtUri<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<OrgProfileDetailViewStatus<S>>,
pub uri: AtUri<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub websites: Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum OrgProfileDetailViewStatus<S: BosStr = DefaultStr> {
Active,
Inactive,
Merged,
Acquired,
Defunct,
Other(S),
}
impl<S: BosStr> OrgProfileDetailViewStatus<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Active => "active",
Self::Inactive => "inactive",
Self::Merged => "merged",
Self::Acquired => "acquired",
Self::Defunct => "defunct",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"active" => Self::Active,
"inactive" => Self::Inactive,
"merged" => Self::Merged,
"acquired" => Self::Acquired,
"defunct" => Self::Defunct,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for OrgProfileDetailViewStatus<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for OrgProfileDetailViewStatus<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for OrgProfileDetailViewStatus<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for OrgProfileDetailViewStatus<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for OrgProfileDetailViewStatus<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for OrgProfileDetailViewStatus<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = OrgProfileDetailViewStatus<S::Output>;
fn into_static(self) -> Self::Output {
match self {
OrgProfileDetailViewStatus::Active => OrgProfileDetailViewStatus::Active,
OrgProfileDetailViewStatus::Inactive => OrgProfileDetailViewStatus::Inactive,
OrgProfileDetailViewStatus::Merged => OrgProfileDetailViewStatus::Merged,
OrgProfileDetailViewStatus::Acquired => OrgProfileDetailViewStatus::Acquired,
OrgProfileDetailViewStatus::Defunct => OrgProfileDetailViewStatus::Defunct,
OrgProfileDetailViewStatus::Other(v) => {
OrgProfileDetailViewStatus::Other(v.into_static())
}
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct OrgProfileSummaryView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<BlobRef<S>>,
pub did: Did<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
pub uri: AtUri<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlatformCategory<S: BosStr = DefaultStr> {
Console,
Portable,
Computer,
Arcade,
OperatingSystem,
Other(S),
}
impl<S: BosStr> PlatformCategory<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Console => "console",
Self::Portable => "portable",
Self::Computer => "computer",
Self::Arcade => "arcade",
Self::OperatingSystem => "operatingSystem",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"console" => Self::Console,
"portable" => Self::Portable,
"computer" => Self::Computer,
"arcade" => Self::Arcade,
"operatingSystem" => Self::OperatingSystem,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for PlatformCategory<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for PlatformCategory<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for PlatformCategory<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for PlatformCategory<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for PlatformCategory<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = PlatformCategory<S::Output>;
fn into_static(self) -> Self::Output {
match self {
PlatformCategory::Console => PlatformCategory::Console,
PlatformCategory::Portable => PlatformCategory::Portable,
PlatformCategory::Computer => PlatformCategory::Computer,
PlatformCategory::Arcade => PlatformCategory::Arcade,
PlatformCategory::OperatingSystem => PlatformCategory::OperatingSystem,
PlatformCategory::Other(v) => PlatformCategory::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct PlatformFeatures<S: BosStr = DefaultStr> {
pub features: Vec<S>,
pub platform: PlatformFeaturesPlatform<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlatformFeaturesPlatform<S: BosStr = DefaultStr> {
Steam,
Gog,
EpicGames,
PlayStation,
Xbox,
NintendoEshop,
Other(S),
}
impl<S: BosStr> PlatformFeaturesPlatform<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Steam => "steam",
Self::Gog => "gog",
Self::EpicGames => "epicGames",
Self::PlayStation => "playStation",
Self::Xbox => "xbox",
Self::NintendoEshop => "nintendoEshop",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"steam" => Self::Steam,
"gog" => Self::Gog,
"epicGames" => Self::EpicGames,
"playStation" => Self::PlayStation,
"xbox" => Self::Xbox,
"nintendoEshop" => Self::NintendoEshop,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for PlatformFeaturesPlatform<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for PlatformFeaturesPlatform<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for PlatformFeaturesPlatform<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for PlatformFeaturesPlatform<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for PlatformFeaturesPlatform<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for PlatformFeaturesPlatform<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = PlatformFeaturesPlatform<S::Output>;
fn into_static(self) -> Self::Output {
match self {
PlatformFeaturesPlatform::Steam => PlatformFeaturesPlatform::Steam,
PlatformFeaturesPlatform::Gog => PlatformFeaturesPlatform::Gog,
PlatformFeaturesPlatform::EpicGames => PlatformFeaturesPlatform::EpicGames,
PlatformFeaturesPlatform::PlayStation => PlatformFeaturesPlatform::PlayStation,
PlatformFeaturesPlatform::Xbox => PlatformFeaturesPlatform::Xbox,
PlatformFeaturesPlatform::NintendoEshop => PlatformFeaturesPlatform::NintendoEshop,
PlatformFeaturesPlatform::Other(v) => PlatformFeaturesPlatform::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct PlatformSummaryView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub abbreviation: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub category: Option<games_gamesgamesgamesgames::PlatformCategory<S>>,
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<S>,
pub uri: AtUri<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 PlatformVersion<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub connectivity: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cpu: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub gpu: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub max_resolution: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub memory: Option<S>,
pub name: S,
#[serde(skip_serializing_if = "Option::is_none")]
pub os: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub output: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub storage: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlayerPerspective<S: BosStr = DefaultStr> {
Auditory,
FirstPerson,
Isometric,
SideView,
Text,
ThirdPerson,
TopDown,
Vr,
Other(S),
}
impl<S: BosStr> PlayerPerspective<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Auditory => "auditory",
Self::FirstPerson => "firstPerson",
Self::Isometric => "isometric",
Self::SideView => "sideView",
Self::Text => "text",
Self::ThirdPerson => "thirdPerson",
Self::TopDown => "topDown",
Self::Vr => "vr",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"auditory" => Self::Auditory,
"firstPerson" => Self::FirstPerson,
"isometric" => Self::Isometric,
"sideView" => Self::SideView,
"text" => Self::Text,
"thirdPerson" => Self::ThirdPerson,
"topDown" => Self::TopDown,
"vr" => Self::Vr,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for PlayerPerspective<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for PlayerPerspective<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for PlayerPerspective<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for PlayerPerspective<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for PlayerPerspective<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = PlayerPerspective<S::Output>;
fn into_static(self) -> Self::Output {
match self {
PlayerPerspective::Auditory => PlayerPerspective::Auditory,
PlayerPerspective::FirstPerson => PlayerPerspective::FirstPerson,
PlayerPerspective::Isometric => PlayerPerspective::Isometric,
PlayerPerspective::SideView => PlayerPerspective::SideView,
PlayerPerspective::Text => PlayerPerspective::Text,
PlayerPerspective::ThirdPerson => PlayerPerspective::ThirdPerson,
PlayerPerspective::TopDown => PlayerPerspective::TopDown,
PlayerPerspective::Vr => PlayerPerspective::Vr,
PlayerPerspective::Other(v) => PlayerPerspective::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ProfileSummaryView<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<BlobRef<S>>,
pub did: Did<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<S>,
pub profile_type: ProfileSummaryViewProfileType<S>,
pub uri: AtUri<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ProfileSummaryViewProfileType<S: BosStr = DefaultStr> {
Actor,
Org,
Other(S),
}
impl<S: BosStr> ProfileSummaryViewProfileType<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Actor => "actor",
Self::Org => "org",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"actor" => Self::Actor,
"org" => Self::Org,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for ProfileSummaryViewProfileType<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for ProfileSummaryViewProfileType<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for ProfileSummaryViewProfileType<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileSummaryViewProfileType<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for ProfileSummaryViewProfileType<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for ProfileSummaryViewProfileType<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = ProfileSummaryViewProfileType<S::Output>;
fn into_static(self) -> Self::Output {
match self {
ProfileSummaryViewProfileType::Actor => ProfileSummaryViewProfileType::Actor,
ProfileSummaryViewProfileType::Org => ProfileSummaryViewProfileType::Org,
ProfileSummaryViewProfileType::Other(v) => {
ProfileSummaryViewProfileType::Other(v.into_static())
}
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Release<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_uri: Option<AtUri<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub release_dates: Option<Vec<games_gamesgamesgamesgames::ReleaseDate<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 ReleaseDate<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<ReleaseDateRegion<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub released_at: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub released_at_format: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<ReleaseDateStatus<S>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ReleaseDateRegion<S: BosStr = DefaultStr> {
Worldwide,
Europe,
NorthAmerica,
Australia,
NewZealand,
Japan,
China,
Asia,
Korea,
Brazil,
Other(S),
}
impl<S: BosStr> ReleaseDateRegion<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Worldwide => "worldwide",
Self::Europe => "europe",
Self::NorthAmerica => "northAmerica",
Self::Australia => "australia",
Self::NewZealand => "newZealand",
Self::Japan => "japan",
Self::China => "china",
Self::Asia => "asia",
Self::Korea => "korea",
Self::Brazil => "brazil",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"worldwide" => Self::Worldwide,
"europe" => Self::Europe,
"northAmerica" => Self::NorthAmerica,
"australia" => Self::Australia,
"newZealand" => Self::NewZealand,
"japan" => Self::Japan,
"china" => Self::China,
"asia" => Self::Asia,
"korea" => Self::Korea,
"brazil" => Self::Brazil,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for ReleaseDateRegion<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for ReleaseDateRegion<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for ReleaseDateRegion<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ReleaseDateRegion<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for ReleaseDateRegion<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for ReleaseDateRegion<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = ReleaseDateRegion<S::Output>;
fn into_static(self) -> Self::Output {
match self {
ReleaseDateRegion::Worldwide => ReleaseDateRegion::Worldwide,
ReleaseDateRegion::Europe => ReleaseDateRegion::Europe,
ReleaseDateRegion::NorthAmerica => ReleaseDateRegion::NorthAmerica,
ReleaseDateRegion::Australia => ReleaseDateRegion::Australia,
ReleaseDateRegion::NewZealand => ReleaseDateRegion::NewZealand,
ReleaseDateRegion::Japan => ReleaseDateRegion::Japan,
ReleaseDateRegion::China => ReleaseDateRegion::China,
ReleaseDateRegion::Asia => ReleaseDateRegion::Asia,
ReleaseDateRegion::Korea => ReleaseDateRegion::Korea,
ReleaseDateRegion::Brazil => ReleaseDateRegion::Brazil,
ReleaseDateRegion::Other(v) => ReleaseDateRegion::Other(v.into_static()),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ReleaseDateStatus<S: BosStr = DefaultStr> {
AdvancedAccess,
Alpha,
Beta,
Cancelled,
DigitalCompatibilityRelease,
EarlyAccess,
NextGenOptimizationRelease,
Offline,
Release,
Other(S),
}
impl<S: BosStr> ReleaseDateStatus<S> {
pub fn as_str(&self) -> &str {
match self {
Self::AdvancedAccess => "advancedAccess",
Self::Alpha => "alpha",
Self::Beta => "beta",
Self::Cancelled => "cancelled",
Self::DigitalCompatibilityRelease => "digitalCompatibilityRelease",
Self::EarlyAccess => "earlyAccess",
Self::NextGenOptimizationRelease => "nextGenOptimizationRelease",
Self::Offline => "offline",
Self::Release => "release",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"advancedAccess" => Self::AdvancedAccess,
"alpha" => Self::Alpha,
"beta" => Self::Beta,
"cancelled" => Self::Cancelled,
"digitalCompatibilityRelease" => Self::DigitalCompatibilityRelease,
"earlyAccess" => Self::EarlyAccess,
"nextGenOptimizationRelease" => Self::NextGenOptimizationRelease,
"offline" => Self::Offline,
"release" => Self::Release,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for ReleaseDateStatus<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for ReleaseDateStatus<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for ReleaseDateStatus<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ReleaseDateStatus<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for ReleaseDateStatus<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for ReleaseDateStatus<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = ReleaseDateStatus<S::Output>;
fn into_static(self) -> Self::Output {
match self {
ReleaseDateStatus::AdvancedAccess => ReleaseDateStatus::AdvancedAccess,
ReleaseDateStatus::Alpha => ReleaseDateStatus::Alpha,
ReleaseDateStatus::Beta => ReleaseDateStatus::Beta,
ReleaseDateStatus::Cancelled => ReleaseDateStatus::Cancelled,
ReleaseDateStatus::DigitalCompatibilityRelease => {
ReleaseDateStatus::DigitalCompatibilityRelease
}
ReleaseDateStatus::EarlyAccess => ReleaseDateStatus::EarlyAccess,
ReleaseDateStatus::NextGenOptimizationRelease => {
ReleaseDateStatus::NextGenOptimizationRelease
}
ReleaseDateStatus::Offline => ReleaseDateStatus::Offline,
ReleaseDateStatus::Release => ReleaseDateStatus::Release,
ReleaseDateStatus::Other(v) => ReleaseDateStatus::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct SkeletonGameFeedItem<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub feed_context: Option<S>,
pub game: AtUri<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 SystemRequirements<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum: Option<games_gamesgamesgamesgames::SystemSpec<S>>,
pub platform: SystemRequirementsPlatform<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub recommended: Option<games_gamesgamesgamesgames::SystemSpec<S>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum SystemRequirementsPlatform<S: BosStr = DefaultStr> {
Windows,
Mac,
Linux,
Other(S),
}
impl<S: BosStr> SystemRequirementsPlatform<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Windows => "windows",
Self::Mac => "mac",
Self::Linux => "linux",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"windows" => Self::Windows,
"mac" => Self::Mac,
"linux" => Self::Linux,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for SystemRequirementsPlatform<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for SystemRequirementsPlatform<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for SystemRequirementsPlatform<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for SystemRequirementsPlatform<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for SystemRequirementsPlatform<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for SystemRequirementsPlatform<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = SystemRequirementsPlatform<S::Output>;
fn into_static(self) -> Self::Output {
match self {
SystemRequirementsPlatform::Windows => SystemRequirementsPlatform::Windows,
SystemRequirementsPlatform::Mac => SystemRequirementsPlatform::Mac,
SystemRequirementsPlatform::Linux => SystemRequirementsPlatform::Linux,
SystemRequirementsPlatform::Other(v) => {
SystemRequirementsPlatform::Other(v.into_static())
}
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct SystemSpec<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_notes: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub directx: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub graphics: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub memory: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub os: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub processor: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sound_card: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub storage: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Theme<S: BosStr = DefaultStr> {
_4x,
Action,
Business,
Comedy,
Drama,
Educational,
Erotic,
Fantasy,
Historical,
Horror,
Kids,
Mystery,
Nonfiction,
OpenWorld,
Party,
Romance,
Sandbox,
Scifi,
Stealth,
Survival,
Thriller,
Warfare,
Other(S),
}
impl<S: BosStr> Theme<S> {
pub fn as_str(&self) -> &str {
match self {
Self::_4x => "4x",
Self::Action => "action",
Self::Business => "business",
Self::Comedy => "comedy",
Self::Drama => "drama",
Self::Educational => "educational",
Self::Erotic => "erotic",
Self::Fantasy => "fantasy",
Self::Historical => "historical",
Self::Horror => "horror",
Self::Kids => "kids",
Self::Mystery => "mystery",
Self::Nonfiction => "nonfiction",
Self::OpenWorld => "openWorld",
Self::Party => "party",
Self::Romance => "romance",
Self::Sandbox => "sandbox",
Self::Scifi => "scifi",
Self::Stealth => "stealth",
Self::Survival => "survival",
Self::Thriller => "thriller",
Self::Warfare => "warfare",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"4x" => Self::_4x,
"action" => Self::Action,
"business" => Self::Business,
"comedy" => Self::Comedy,
"drama" => Self::Drama,
"educational" => Self::Educational,
"erotic" => Self::Erotic,
"fantasy" => Self::Fantasy,
"historical" => Self::Historical,
"horror" => Self::Horror,
"kids" => Self::Kids,
"mystery" => Self::Mystery,
"nonfiction" => Self::Nonfiction,
"openWorld" => Self::OpenWorld,
"party" => Self::Party,
"romance" => Self::Romance,
"sandbox" => Self::Sandbox,
"scifi" => Self::Scifi,
"stealth" => Self::Stealth,
"survival" => Self::Survival,
"thriller" => Self::Thriller,
"warfare" => Self::Warfare,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> AsRef<str> for Theme<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> core::fmt::Display for Theme<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> Serialize for Theme<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for Theme<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr> jacquard_common::IntoStatic for Theme<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = Theme<S::Output>;
fn into_static(self) -> Self::Output {
match self {
Theme::_4x => Theme::_4x,
Theme::Action => Theme::Action,
Theme::Business => Theme::Business,
Theme::Comedy => Theme::Comedy,
Theme::Drama => Theme::Drama,
Theme::Educational => Theme::Educational,
Theme::Erotic => Theme::Erotic,
Theme::Fantasy => Theme::Fantasy,
Theme::Historical => Theme::Historical,
Theme::Horror => Theme::Horror,
Theme::Kids => Theme::Kids,
Theme::Mystery => Theme::Mystery,
Theme::Nonfiction => Theme::Nonfiction,
Theme::OpenWorld => Theme::OpenWorld,
Theme::Party => Theme::Party,
Theme::Romance => Theme::Romance,
Theme::Sandbox => Theme::Sandbox,
Theme::Scifi => Theme::Scifi,
Theme::Stealth => Theme::Stealth,
Theme::Survival => Theme::Survival,
Theme::Thriller => Theme::Thriller,
Theme::Warfare => Theme::Warfare,
Theme::Other(v) => Theme::Other(v.into_static()),
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct TimeToBeat<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub completely: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hastily: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub normally: Option<i64>,
#[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 ViewerState<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub like: Option<AtUri<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",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Website<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub r#type: Option<WebsiteType<S>>,
pub url: UriValue<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum WebsiteType<S: BosStr = DefaultStr> {
Official,
Wiki,
Steam,
Gog,
EpicGames,
ItchIo,
Twitter,
Instagram,
Youtube,
Twitch,
Discord,
Reddit,
Facebook,
Wikipedia,
Bluesky,
Xbox,
Playstation,
Nintendo,
Meta,
Other,
UnknownValue(S),
}
impl<S: BosStr> WebsiteType<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Official => "official",
Self::Wiki => "wiki",
Self::Steam => "steam",
Self::Gog => "gog",
Self::EpicGames => "epicGames",
Self::ItchIo => "itchIo",
Self::Twitter => "twitter",
Self::Instagram => "instagram",
Self::Youtube => "youtube",
Self::Twitch => "twitch",
Self::Discord => "discord",
Self::Reddit => "reddit",
Self::Facebook => "facebook",
Self::Wikipedia => "wikipedia",
Self::Bluesky => "bluesky",
Self::Xbox => "xbox",
Self::Playstation => "playstation",
Self::Nintendo => "nintendo",
Self::Meta => "meta",
Self::Other => "other",
Self::UnknownValue(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"official" => Self::Official,
"wiki" => Self::Wiki,
"steam" => Self::Steam,
"gog" => Self::Gog,
"epicGames" => Self::EpicGames,
"itchIo" => Self::ItchIo,
"twitter" => Self::Twitter,
"instagram" => Self::Instagram,
"youtube" => Self::Youtube,
"twitch" => Self::Twitch,
"discord" => Self::Discord,
"reddit" => Self::Reddit,
"facebook" => Self::Facebook,
"wikipedia" => Self::Wikipedia,
"bluesky" => Self::Bluesky,
"xbox" => Self::Xbox,
"playstation" => Self::Playstation,
"nintendo" => Self::Nintendo,
"meta" => Self::Meta,
"other" => Self::Other,
_ => Self::UnknownValue(s),
}
}
}
impl<S: BosStr> core::fmt::Display for WebsiteType<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for WebsiteType<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for WebsiteType<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for WebsiteType<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for WebsiteType<S> {
fn default() -> Self {
Self::UnknownValue(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for WebsiteType<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = WebsiteType<S::Output>;
fn into_static(self) -> Self::Output {
match self {
WebsiteType::Official => WebsiteType::Official,
WebsiteType::Wiki => WebsiteType::Wiki,
WebsiteType::Steam => WebsiteType::Steam,
WebsiteType::Gog => WebsiteType::Gog,
WebsiteType::EpicGames => WebsiteType::EpicGames,
WebsiteType::ItchIo => WebsiteType::ItchIo,
WebsiteType::Twitter => WebsiteType::Twitter,
WebsiteType::Instagram => WebsiteType::Instagram,
WebsiteType::Youtube => WebsiteType::Youtube,
WebsiteType::Twitch => WebsiteType::Twitch,
WebsiteType::Discord => WebsiteType::Discord,
WebsiteType::Reddit => WebsiteType::Reddit,
WebsiteType::Facebook => WebsiteType::Facebook,
WebsiteType::Wikipedia => WebsiteType::Wikipedia,
WebsiteType::Bluesky => WebsiteType::Bluesky,
WebsiteType::Xbox => WebsiteType::Xbox,
WebsiteType::Playstation => WebsiteType::Playstation,
WebsiteType::Nintendo => WebsiteType::Nintendo,
WebsiteType::Meta => WebsiteType::Meta,
WebsiteType::Other => WebsiteType::Other,
WebsiteType::UnknownValue(v) => WebsiteType::UnknownValue(v.into_static()),
}
}
}
impl<S: BosStr> LexiconSchema for ActorCreditView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"actorCreditView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ActorProfileDetailView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"actorProfileDetailView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("avatar"),
max: 10000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.avatar {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/png", "image/jpeg"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("avatar"),
accepted: vec!["image/png".to_string(), "image/jpeg".to_string()],
actual: mime.to_string(),
});
}
}
}
if let Some(ref value) = self.description {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 3000usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("description"),
max: 3000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.pronouns {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 200usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("pronouns"),
max: 200usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ActorProfileSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"actorProfileSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("avatar"),
max: 10000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.avatar {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/png", "image/jpeg"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("avatar"),
accepted: vec!["image/png".to_string(), "image/jpeg".to_string()],
actual: mime.to_string(),
});
}
}
}
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for AgeRating<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"ageRating"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for AlternativeName<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"alternativeName"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for CollectionSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"collectionSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for CreditEntry<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"creditEntry"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.department {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("department"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for EngineSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"engineSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ExternalIds<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"externalIds"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ExternalVideo<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"externalVideo"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for GameDetailView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameDetailView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for GameFeedViewItem<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameFeedViewItem"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.feed_context {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 2000usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("feed_context"),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for GameSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for GameView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.like_count {
if *value < 0i64 {
return Err(ConstraintError::Minimum {
path: ValidationPath::from_field("like_count"),
min: 0i64,
actual: *value,
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ItchIoId<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"itchIoId"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for LanguageSupport<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"languageSupport"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for MediaItem<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"mediaItem"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.blob {
{
let size = value.blob().size;
if size > 200000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("blob"),
max: 200000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.blob {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/*", "video/*"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("blob"),
accepted: vec!["image/*".to_string(), "video/*".to_string()],
actual: mime.to_string(),
});
}
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for MultiplayerMode<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"multiplayerMode"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for OrgCreditView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"orgCreditView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for OrgProfileDetailView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"orgProfileDetailView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("avatar"),
max: 10000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.avatar {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/png", "image/jpeg"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("avatar"),
accepted: vec!["image/png".to_string(), "image/jpeg".to_string()],
actual: mime.to_string(),
});
}
}
}
if let Some(ref value) = self.description {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 3000usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("description"),
max: 3000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for OrgProfileSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"orgProfileSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("avatar"),
max: 10000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.avatar {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/png", "image/jpeg"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("avatar"),
accepted: vec!["image/png".to_string(), "image/jpeg".to_string()],
actual: mime.to_string(),
});
}
}
}
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for PlatformFeatures<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformFeatures"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for PlatformSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for PlatformVersion<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformVersion"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ProfileSummaryView<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"profileSummaryView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(ConstraintError::BlobTooLarge {
path: ValidationPath::from_field("avatar"),
max: 10000000usize,
actual: size,
});
}
}
}
if let Some(ref value) = self.avatar {
{
let mime = value.blob().mime_type.as_str();
let accepted: &[&str] = &["image/png", "image/jpeg"];
let matched = accepted.iter().any(|pattern| {
if *pattern == "*/*" {
true
} else if pattern.ends_with("/*") {
let prefix = &pattern[..pattern.len() - 2];
mime.starts_with(prefix) && mime.as_bytes().get(prefix.len()) == Some(&b'/')
} else {
mime == *pattern
}
});
if !matched {
return Err(ConstraintError::BlobMimeTypeNotAccepted {
path: ValidationPath::from_field("avatar"),
accepted: vec!["image/png".to_string(), "image/jpeg".to_string()],
actual: mime.to_string(),
});
}
}
}
if let Some(ref value) = self.display_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("display_name"),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for Release<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"release"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ReleaseDate<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"releaseDate"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for SkeletonGameFeedItem<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"skeletonGameFeedItem"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.feed_context {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 2000usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("feed_context"),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for SystemRequirements<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"systemRequirements"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for SystemSpec<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"systemSpec"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for TimeToBeat<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"timeToBeat"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ViewerState<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"viewerState"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for Website<S> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"website"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
pub mod actor_credit_view_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 Uri;
type Credits;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Credits = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Credits = St::Credits;
}
pub struct SetCredits<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetCredits<St> {}
impl<St: State> State for SetCredits<St> {
type Uri = St::Uri;
type Credits = Set<members::credits>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct credits(());
}
}
pub struct ActorCreditViewBuilder<S: BosStr, St: actor_credit_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::CreditEntry<S>>>,
Option<S>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> ActorCreditView<S> {
pub fn new() -> ActorCreditViewBuilder<S, actor_credit_view_state::Empty> {
ActorCreditViewBuilder::new()
}
}
impl<S: BosStr> ActorCreditViewBuilder<S, actor_credit_view_state::Empty> {
pub fn new() -> Self {
ActorCreditViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_credit_view_state::State> ActorCreditViewBuilder<S, St> {
pub fn actor_uri(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_actor_uri(mut self, value: Option<AtUri<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> ActorCreditViewBuilder<S, St>
where
St: actor_credit_view_state::State,
St::Credits: actor_credit_view_state::IsUnset,
{
pub fn credits(
mut self,
value: impl Into<Vec<games_gamesgamesgamesgames::CreditEntry<S>>>,
) -> ActorCreditViewBuilder<S, actor_credit_view_state::SetCredits<St>> {
self._fields.1 = Option::Some(value.into());
ActorCreditViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_credit_view_state::State> ActorCreditViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> ActorCreditViewBuilder<S, St>
where
St: actor_credit_view_state::State,
St::Uri: actor_credit_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> ActorCreditViewBuilder<S, actor_credit_view_state::SetUri<St>> {
self._fields.3 = Option::Some(value.into());
ActorCreditViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> ActorCreditViewBuilder<S, St>
where
St: actor_credit_view_state::State,
St::Uri: actor_credit_view_state::IsSet,
St::Credits: actor_credit_view_state::IsSet,
{
pub fn build(self) -> ActorCreditView<S> {
ActorCreditView {
actor_uri: self._fields.0,
credits: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ActorCreditView<S> {
ActorCreditView {
actor_uri: self._fields.0,
credits: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_games_gamesgamesgamesgames_defs() -> 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("games.gamesgamesgamesgames.defs"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("actorCreditView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("credits"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("actorUri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("credits"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#creditEntry",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("actorProfileDetailView"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("uri"), SmolStr::new_static("did")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("avatar"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("description"),
LexObjectProperty::String(LexString {
max_length: Some(3000usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("descriptionFacets"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("app.bsky.richtext.facet"),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("did"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Did),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("pronouns"),
LexObjectProperty::String(LexString {
max_length: Some(200usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("websites"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
..Default::default()
}),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("actorProfileSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("uri"), SmolStr::new_static("did")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("avatar"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("did"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Did),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("ageRating"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("organization"),
SmolStr::new_static("rating"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("contentDescriptors"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::String(LexString {
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("organization"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("rating"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("alternativeName"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("name")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("comment"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("locale"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("applicationType"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("collectionSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("name"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("type"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("companyRole"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("creditEntry"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("role")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("department"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("role"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#individualRole",
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("engineSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("name"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("externalIds"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("appleAppStore"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("epicGames"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gog"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("googlePlay"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("humbleBundle"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("igdb"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("itchIo"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#itchIoId",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("nintendoEshop"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("playStation"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("steam"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("twitch"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("xbox"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("externalVideo"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("videoId"),
SmolStr::new_static("platform"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("platform"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("title"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("videoId"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gameDetailView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("name"),
SmolStr::new_static("uri"),
SmolStr::new_static("createdAt"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("actorCredits"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#actorCreditView",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("ageRatings"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#ageRating",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("alternativeNames"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#alternativeName",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("applicationType"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("collections"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("engines"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("externalIds"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#externalIds",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("genres"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#genre",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keywords"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::String(LexString {
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("languageSupports"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#languageSupport",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("media"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("modes"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mode",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("multiplayerModes"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#multiplayerMode",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orgCredits"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#orgCreditView",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("parent"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("playerPerspectives"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#playerPerspective",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("publishedAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releases"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#release",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("storyline"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("summary"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("themes"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#theme",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("timeToBeat"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#timeToBeat",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("videos"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#externalVideo",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("websites"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
..Default::default()
}),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gameFeedViewItem"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("game")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("feedContext"),
LexObjectProperty::String(LexString {
max_length: Some(2000usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("game"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#gameView",
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gameSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("name"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("applicationType"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("firstReleaseDate"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("media"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("summary"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gameView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("name"),
SmolStr::new_static("applicationType"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("applicationType"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("genres"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#genre",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("likeCount"),
LexObjectProperty::Integer(LexInteger {
minimum: Some(0i64),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("media"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releases"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#release",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("summary"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("themes"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#theme",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewer"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#viewerState",
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("genre"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("individualRole"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("itchIoId"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("developer"),
SmolStr::new_static("game"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("developer"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("game"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("languageSupport"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("language")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("audio"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("interface"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("language"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("subtitles"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mediaItem"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("blob"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("description"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("height"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("locale"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mediaType"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("title"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("width"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mode"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("multiplayerMode"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("hasCampaignCoop"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hasDropIn"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hasLanCoop"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hasSplitscreen"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hasSplitscreenOnline"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("offlineCoopMax"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("offlineMax"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("onlineCoopMax"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("onlineMax"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platform"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orgCreditView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("roles"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orgUri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("roles"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#companyRole",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orgProfileDetailView"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("uri"), SmolStr::new_static("did")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("avatar"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("country"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("description"),
LexObjectProperty::String(LexString {
max_length: Some(3000usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("descriptionFacets"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("app.bsky.richtext.facet"),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("did"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Did),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("foundedAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("media"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("parent"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("status"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("websites"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
..Default::default()
}),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orgProfileSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("uri"), SmolStr::new_static("did")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("avatar"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("did"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Did),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platformCategory"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platformFeatures"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static(
"Features supported by a game on a specific storefront/platform.",
)),
required: Some(vec![
SmolStr::new_static("platform"),
SmolStr::new_static("features"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("features"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::String(LexString {
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platform"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platformSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("name"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("abbreviation"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("category"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#platformCategory",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platformVersion"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("name")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("connectivity"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cpu"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("gpu"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("maxResolution"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("media"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("memory"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("os"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("output"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("storage"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("summary"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("playerPerspective"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profileSummaryView"),
LexUserType::Object(LexObject {
required: Some(vec![
SmolStr::new_static("uri"),
SmolStr::new_static("did"),
SmolStr::new_static("profileType"),
]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("avatar"),
LexObjectProperty::Blob(LexBlob {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("did"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Did),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("displayName"),
LexObjectProperty::String(LexString {
max_length: Some(640usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profileType"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("release"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("platform"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Free-text platform name, used when no platform record exists.",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platformUri"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"AT URI of a platform record.",
)),
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releaseDates"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static(
"games.gamesgamesgamesgames.defs#releaseDate",
),
..Default::default()
}),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releaseDate"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("region"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releasedAt"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("releasedAtFormat"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("status"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("skeletonGameFeedItem"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("game")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("feedContext"),
LexObjectProperty::String(LexString {
max_length: Some(2000usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("game"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("systemRequirements"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static(
"System requirements for a game on a specific platform.",
)),
required: Some(vec![SmolStr::new_static("platform")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("minimum"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#systemSpec"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platform"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("recommended"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#systemSpec"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("systemSpec"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static(
"Hardware/software specification for a platform.",
)),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("additionalNotes"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("directx"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("graphics"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("memory"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("os"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("processor"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("soundCard"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("storage"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("theme"),
LexUserType::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("timeToBeat"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("completely"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hastily"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("normally"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewerState"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("like"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("website"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("url")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("type"),
LexObjectProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("url"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Uri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}
pub mod actor_profile_detail_view_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 Uri;
type Did;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Did = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Did = St::Did;
}
pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetDid<St> {}
impl<St: State> State for SetDid<St> {
type Uri = St::Uri;
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct did(());
}
}
pub struct ActorProfileDetailViewBuilder<S: BosStr, St: actor_profile_detail_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<BlobRef<S>>,
Option<Datetime>,
Option<S>,
Option<Vec<Facet<S>>>,
Option<Did<S>>,
Option<S>,
Option<S>,
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> ActorProfileDetailView<S> {
pub fn new() -> ActorProfileDetailViewBuilder<S, actor_profile_detail_view_state::Empty> {
ActorProfileDetailViewBuilder::new()
}
}
impl<S: BosStr> ActorProfileDetailViewBuilder<S, actor_profile_detail_view_state::Empty> {
pub fn new() -> Self {
ActorProfileDetailViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn avatar(mut self, value: impl Into<Option<BlobRef<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_avatar(mut self, value: Option<BlobRef<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn description(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_description(mut self, value: Option<S>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn description_facets(mut self, value: impl Into<Option<Vec<Facet<S>>>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_description_facets(mut self, value: Option<Vec<Facet<S>>>) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St> ActorProfileDetailViewBuilder<S, St>
where
St: actor_profile_detail_view_state::State,
St::Did: actor_profile_detail_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<Did<S>>,
) -> ActorProfileDetailViewBuilder<S, actor_profile_detail_view_state::SetDid<St>> {
self._fields.4 = Option::Some(value.into());
ActorProfileDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.5 = value;
self
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn pronouns(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_pronouns(mut self, value: Option<S>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St> ActorProfileDetailViewBuilder<S, St>
where
St: actor_profile_detail_view_state::State,
St::Uri: actor_profile_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> ActorProfileDetailViewBuilder<S, actor_profile_detail_view_state::SetUri<St>> {
self._fields.7 = Option::Some(value.into());
ActorProfileDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_profile_detail_view_state::State> ActorProfileDetailViewBuilder<S, St> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Website<S>>>>,
) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
) -> Self {
self._fields.8 = value;
self
}
}
impl<S: BosStr, St> ActorProfileDetailViewBuilder<S, St>
where
St: actor_profile_detail_view_state::State,
St::Uri: actor_profile_detail_view_state::IsSet,
St::Did: actor_profile_detail_view_state::IsSet,
{
pub fn build(self) -> ActorProfileDetailView<S> {
ActorProfileDetailView {
avatar: self._fields.0,
created_at: self._fields.1,
description: self._fields.2,
description_facets: self._fields.3,
did: self._fields.4.unwrap(),
display_name: self._fields.5,
pronouns: self._fields.6,
uri: self._fields.7.unwrap(),
websites: self._fields.8,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> ActorProfileDetailView<S> {
ActorProfileDetailView {
avatar: self._fields.0,
created_at: self._fields.1,
description: self._fields.2,
description_facets: self._fields.3,
did: self._fields.4.unwrap(),
display_name: self._fields.5,
pronouns: self._fields.6,
uri: self._fields.7.unwrap(),
websites: self._fields.8,
extra_data: Some(extra_data),
}
}
}
pub mod actor_profile_summary_view_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 Did;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Did = Unset;
type Uri = Unset;
}
pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetDid<St> {}
impl<St: State> State for SetDid<St> {
type Did = Set<members::did>;
type Uri = St::Uri;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Did = St::Did;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
pub struct uri(());
}
}
pub struct ActorProfileSummaryViewBuilder<S: BosStr, St: actor_profile_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<BlobRef<S>>,
Option<Did<S>>,
Option<S>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> ActorProfileSummaryView<S> {
pub fn new() -> ActorProfileSummaryViewBuilder<S, actor_profile_summary_view_state::Empty> {
ActorProfileSummaryViewBuilder::new()
}
}
impl<S: BosStr> ActorProfileSummaryViewBuilder<S, actor_profile_summary_view_state::Empty> {
pub fn new() -> Self {
ActorProfileSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_profile_summary_view_state::State> ActorProfileSummaryViewBuilder<S, St> {
pub fn avatar(mut self, value: impl Into<Option<BlobRef<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_avatar(mut self, value: Option<BlobRef<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> ActorProfileSummaryViewBuilder<S, St>
where
St: actor_profile_summary_view_state::State,
St::Did: actor_profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<Did<S>>,
) -> ActorProfileSummaryViewBuilder<S, actor_profile_summary_view_state::SetDid<St>> {
self._fields.1 = Option::Some(value.into());
ActorProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: actor_profile_summary_view_state::State> ActorProfileSummaryViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> ActorProfileSummaryViewBuilder<S, St>
where
St: actor_profile_summary_view_state::State,
St::Uri: actor_profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> ActorProfileSummaryViewBuilder<S, actor_profile_summary_view_state::SetUri<St>> {
self._fields.3 = Option::Some(value.into());
ActorProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> ActorProfileSummaryViewBuilder<S, St>
where
St: actor_profile_summary_view_state::State,
St::Did: actor_profile_summary_view_state::IsSet,
St::Uri: actor_profile_summary_view_state::IsSet,
{
pub fn build(self) -> ActorProfileSummaryView<S> {
ActorProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> ActorProfileSummaryView<S> {
ActorProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod collection_summary_view_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 Name;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Name = Unset;
type Uri = Unset;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Name = Set<members::name>;
type Uri = St::Uri;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Name = St::Name;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct name(());
pub struct uri(());
}
}
pub struct CollectionSummaryViewBuilder<S: BosStr, St: collection_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<S>,
Option<S>,
Option<CollectionSummaryViewType<S>>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> CollectionSummaryView<S> {
pub fn new() -> CollectionSummaryViewBuilder<S, collection_summary_view_state::Empty> {
CollectionSummaryViewBuilder::new()
}
}
impl<S: BosStr> CollectionSummaryViewBuilder<S, collection_summary_view_state::Empty> {
pub fn new() -> Self {
CollectionSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> CollectionSummaryViewBuilder<S, St>
where
St: collection_summary_view_state::State,
St::Name: collection_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<S>,
) -> CollectionSummaryViewBuilder<S, collection_summary_view_state::SetName<St>> {
self._fields.0 = Option::Some(value.into());
CollectionSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: collection_summary_view_state::State> CollectionSummaryViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: collection_summary_view_state::State> CollectionSummaryViewBuilder<S, St> {
pub fn r#type(mut self, value: impl Into<Option<CollectionSummaryViewType<S>>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_type(mut self, value: Option<CollectionSummaryViewType<S>>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> CollectionSummaryViewBuilder<S, St>
where
St: collection_summary_view_state::State,
St::Uri: collection_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> CollectionSummaryViewBuilder<S, collection_summary_view_state::SetUri<St>> {
self._fields.3 = Option::Some(value.into());
CollectionSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> CollectionSummaryViewBuilder<S, St>
where
St: collection_summary_view_state::State,
St::Name: collection_summary_view_state::IsSet,
St::Uri: collection_summary_view_state::IsSet,
{
pub fn build(self) -> CollectionSummaryView<S> {
CollectionSummaryView {
name: self._fields.0.unwrap(),
slug: self._fields.1,
r#type: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> CollectionSummaryView<S> {
CollectionSummaryView {
name: self._fields.0.unwrap(),
slug: self._fields.1,
r#type: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod credit_entry_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 Role;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Role = Unset;
}
pub struct SetRole<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetRole<St> {}
impl<St: State> State for SetRole<St> {
type Role = Set<members::role>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct role(());
}
}
pub struct CreditEntryBuilder<S: BosStr, St: credit_entry_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<S>,
Option<games_gamesgamesgamesgames::IndividualRole<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> CreditEntry<S> {
pub fn new() -> CreditEntryBuilder<S, credit_entry_state::Empty> {
CreditEntryBuilder::new()
}
}
impl<S: BosStr> CreditEntryBuilder<S, credit_entry_state::Empty> {
pub fn new() -> Self {
CreditEntryBuilder {
_state: PhantomData,
_fields: (None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: credit_entry_state::State> CreditEntryBuilder<S, St> {
pub fn department(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_department(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> CreditEntryBuilder<S, St>
where
St: credit_entry_state::State,
St::Role: credit_entry_state::IsUnset,
{
pub fn role(
mut self,
value: impl Into<games_gamesgamesgamesgames::IndividualRole<S>>,
) -> CreditEntryBuilder<S, credit_entry_state::SetRole<St>> {
self._fields.1 = Option::Some(value.into());
CreditEntryBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> CreditEntryBuilder<S, St>
where
St: credit_entry_state::State,
St::Role: credit_entry_state::IsSet,
{
pub fn build(self) -> CreditEntry<S> {
CreditEntry {
department: self._fields.0,
role: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> CreditEntry<S> {
CreditEntry {
department: self._fields.0,
role: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod engine_summary_view_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 Uri;
type Name;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Name = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Name = St::Name;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Uri = St::Uri;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
}
}
pub struct EngineSummaryViewBuilder<S: BosStr, St: engine_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<S>, Option<S>, Option<AtUri<S>>),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> EngineSummaryView<S> {
pub fn new() -> EngineSummaryViewBuilder<S, engine_summary_view_state::Empty> {
EngineSummaryViewBuilder::new()
}
}
impl<S: BosStr> EngineSummaryViewBuilder<S, engine_summary_view_state::Empty> {
pub fn new() -> Self {
EngineSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> EngineSummaryViewBuilder<S, St>
where
St: engine_summary_view_state::State,
St::Name: engine_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<S>,
) -> EngineSummaryViewBuilder<S, engine_summary_view_state::SetName<St>> {
self._fields.0 = Option::Some(value.into());
EngineSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: engine_summary_view_state::State> EngineSummaryViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St> EngineSummaryViewBuilder<S, St>
where
St: engine_summary_view_state::State,
St::Uri: engine_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> EngineSummaryViewBuilder<S, engine_summary_view_state::SetUri<St>> {
self._fields.2 = Option::Some(value.into());
EngineSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> EngineSummaryViewBuilder<S, St>
where
St: engine_summary_view_state::State,
St::Uri: engine_summary_view_state::IsSet,
St::Name: engine_summary_view_state::IsSet,
{
pub fn build(self) -> EngineSummaryView<S> {
EngineSummaryView {
name: self._fields.0.unwrap(),
slug: self._fields.1,
uri: self._fields.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> EngineSummaryView<S> {
EngineSummaryView {
name: self._fields.0.unwrap(),
slug: self._fields.1,
uri: self._fields.2.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod game_detail_view_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 Uri;
type CreatedAt;
type Name;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type CreatedAt = Unset;
type Name = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type CreatedAt = St::CreatedAt;
type Name = St::Name;
}
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 Uri = St::Uri;
type CreatedAt = Set<members::created_at>;
type Name = St::Name;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Uri = St::Uri;
type CreatedAt = St::CreatedAt;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct created_at(());
pub struct name(());
}
}
pub struct GameDetailViewBuilder<S: BosStr, St: game_detail_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<Vec<games_gamesgamesgamesgames::ActorCreditView<S>>>,
Option<Vec<games_gamesgamesgamesgames::AgeRating<S>>>,
Option<Vec<games_gamesgamesgamesgames::AlternativeName<S>>>,
Option<games_gamesgamesgamesgames::ApplicationType<S>>,
Option<Vec<AtUri<S>>>,
Option<Datetime>,
Option<Vec<AtUri<S>>>,
Option<games_gamesgamesgamesgames::ExternalIds<S>>,
Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
Option<Vec<S>>,
Option<Vec<games_gamesgamesgamesgames::LanguageSupport<S>>>,
Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
Option<Vec<games_gamesgamesgamesgames::Mode<S>>>,
Option<Vec<games_gamesgamesgamesgames::MultiplayerMode<S>>>,
Option<S>,
Option<Vec<games_gamesgamesgamesgames::OrgCreditView<S>>>,
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::PlayerPerspective<S>>>,
Option<Datetime>,
Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
Option<S>,
Option<S>,
Option<S>,
Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
Option<games_gamesgamesgamesgames::TimeToBeat<S>>,
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::ExternalVideo<S>>>,
Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> GameDetailView<S> {
pub fn new() -> GameDetailViewBuilder<S, game_detail_view_state::Empty> {
GameDetailViewBuilder::new()
}
}
impl<S: BosStr> GameDetailViewBuilder<S, game_detail_view_state::Empty> {
pub fn new() -> Self {
GameDetailViewBuilder {
_state: PhantomData,
_fields: (
None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None,
),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn actor_credits(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::ActorCreditView<S>>>>,
) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_actor_credits(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::ActorCreditView<S>>>,
) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn age_ratings(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::AgeRating<S>>>>,
) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_age_ratings(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::AgeRating<S>>>,
) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn alternative_names(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::AlternativeName<S>>>>,
) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_alternative_names(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::AlternativeName<S>>>,
) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn application_type(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::ApplicationType<S>>>,
) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_application_type(
mut self,
value: Option<games_gamesgamesgamesgames::ApplicationType<S>>,
) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn collections(mut self, value: impl Into<Option<Vec<AtUri<S>>>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_collections(mut self, value: Option<Vec<AtUri<S>>>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St> GameDetailViewBuilder<S, St>
where
St: game_detail_view_state::State,
St::CreatedAt: game_detail_view_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<Datetime>,
) -> GameDetailViewBuilder<S, game_detail_view_state::SetCreatedAt<St>> {
self._fields.5 = Option::Some(value.into());
GameDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn engines(mut self, value: impl Into<Option<Vec<AtUri<S>>>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_engines(mut self, value: Option<Vec<AtUri<S>>>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn external_ids(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::ExternalIds<S>>>,
) -> Self {
self._fields.7 = value.into();
self
}
pub fn maybe_external_ids(
mut self,
value: Option<games_gamesgamesgamesgames::ExternalIds<S>>,
) -> Self {
self._fields.7 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn genres(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Genre<S>>>>,
) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_genres(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
) -> Self {
self._fields.8 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn keywords(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
self._fields.9 = value.into();
self
}
pub fn maybe_keywords(mut self, value: Option<Vec<S>>) -> Self {
self._fields.9 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn language_supports(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::LanguageSupport<S>>>>,
) -> Self {
self._fields.10 = value.into();
self
}
pub fn maybe_language_supports(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::LanguageSupport<S>>>,
) -> Self {
self._fields.10 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn media(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>>,
) -> Self {
self._fields.11 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
) -> Self {
self._fields.11 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn modes(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Mode<S>>>>,
) -> Self {
self._fields.12 = value.into();
self
}
pub fn maybe_modes(mut self, value: Option<Vec<games_gamesgamesgamesgames::Mode<S>>>) -> Self {
self._fields.12 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn multiplayer_modes(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::MultiplayerMode<S>>>>,
) -> Self {
self._fields.13 = value.into();
self
}
pub fn maybe_multiplayer_modes(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::MultiplayerMode<S>>>,
) -> Self {
self._fields.13 = value;
self
}
}
impl<S: BosStr, St> GameDetailViewBuilder<S, St>
where
St: game_detail_view_state::State,
St::Name: game_detail_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<S>,
) -> GameDetailViewBuilder<S, game_detail_view_state::SetName<St>> {
self._fields.14 = Option::Some(value.into());
GameDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn org_credits(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::OrgCreditView<S>>>>,
) -> Self {
self._fields.15 = value.into();
self
}
pub fn maybe_org_credits(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::OrgCreditView<S>>>,
) -> Self {
self._fields.15 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn parent(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
self._fields.16 = value.into();
self
}
pub fn maybe_parent(mut self, value: Option<AtUri<S>>) -> Self {
self._fields.16 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn player_perspectives(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::PlayerPerspective<S>>>>,
) -> Self {
self._fields.17 = value.into();
self
}
pub fn maybe_player_perspectives(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::PlayerPerspective<S>>>,
) -> Self {
self._fields.17 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn published_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.18 = value.into();
self
}
pub fn maybe_published_at(mut self, value: Option<Datetime>) -> Self {
self._fields.18 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn releases(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Release<S>>>>,
) -> Self {
self._fields.19 = value.into();
self
}
pub fn maybe_releases(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
) -> Self {
self._fields.19 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.20 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.20 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn storyline(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.21 = value.into();
self
}
pub fn maybe_storyline(mut self, value: Option<S>) -> Self {
self._fields.21 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn summary(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.22 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<S>) -> Self {
self._fields.22 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn themes(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Theme<S>>>>,
) -> Self {
self._fields.23 = value.into();
self
}
pub fn maybe_themes(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
) -> Self {
self._fields.23 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn time_to_beat(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::TimeToBeat<S>>>,
) -> Self {
self._fields.24 = value.into();
self
}
pub fn maybe_time_to_beat(
mut self,
value: Option<games_gamesgamesgamesgames::TimeToBeat<S>>,
) -> Self {
self._fields.24 = value;
self
}
}
impl<S: BosStr, St> GameDetailViewBuilder<S, St>
where
St: game_detail_view_state::State,
St::Uri: game_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> GameDetailViewBuilder<S, game_detail_view_state::SetUri<St>> {
self._fields.25 = Option::Some(value.into());
GameDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn videos(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::ExternalVideo<S>>>>,
) -> Self {
self._fields.26 = value.into();
self
}
pub fn maybe_videos(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::ExternalVideo<S>>>,
) -> Self {
self._fields.26 = value;
self
}
}
impl<S: BosStr, St: game_detail_view_state::State> GameDetailViewBuilder<S, St> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Website<S>>>>,
) -> Self {
self._fields.27 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
) -> Self {
self._fields.27 = value;
self
}
}
impl<S: BosStr, St> GameDetailViewBuilder<S, St>
where
St: game_detail_view_state::State,
St::Uri: game_detail_view_state::IsSet,
St::CreatedAt: game_detail_view_state::IsSet,
St::Name: game_detail_view_state::IsSet,
{
pub fn build(self) -> GameDetailView<S> {
GameDetailView {
actor_credits: self._fields.0,
age_ratings: self._fields.1,
alternative_names: self._fields.2,
application_type: self._fields.3,
collections: self._fields.4,
created_at: self._fields.5.unwrap(),
engines: self._fields.6,
external_ids: self._fields.7,
genres: self._fields.8,
keywords: self._fields.9,
language_supports: self._fields.10,
media: self._fields.11,
modes: self._fields.12,
multiplayer_modes: self._fields.13,
name: self._fields.14.unwrap(),
org_credits: self._fields.15,
parent: self._fields.16,
player_perspectives: self._fields.17,
published_at: self._fields.18,
releases: self._fields.19,
slug: self._fields.20,
storyline: self._fields.21,
summary: self._fields.22,
themes: self._fields.23,
time_to_beat: self._fields.24,
uri: self._fields.25.unwrap(),
videos: self._fields.26,
websites: self._fields.27,
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> GameDetailView<S> {
GameDetailView {
actor_credits: self._fields.0,
age_ratings: self._fields.1,
alternative_names: self._fields.2,
application_type: self._fields.3,
collections: self._fields.4,
created_at: self._fields.5.unwrap(),
engines: self._fields.6,
external_ids: self._fields.7,
genres: self._fields.8,
keywords: self._fields.9,
language_supports: self._fields.10,
media: self._fields.11,
modes: self._fields.12,
multiplayer_modes: self._fields.13,
name: self._fields.14.unwrap(),
org_credits: self._fields.15,
parent: self._fields.16,
player_perspectives: self._fields.17,
published_at: self._fields.18,
releases: self._fields.19,
slug: self._fields.20,
storyline: self._fields.21,
summary: self._fields.22,
themes: self._fields.23,
time_to_beat: self._fields.24,
uri: self._fields.25.unwrap(),
videos: self._fields.26,
websites: self._fields.27,
extra_data: Some(extra_data),
}
}
}
pub mod game_feed_view_item_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 Game;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Game = Unset;
}
pub struct SetGame<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetGame<St> {}
impl<St: State> State for SetGame<St> {
type Game = Set<members::game>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct game(());
}
}
pub struct GameFeedViewItemBuilder<S: BosStr, St: game_feed_view_item_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<S>, Option<games_gamesgamesgamesgames::GameView<S>>),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> GameFeedViewItem<S> {
pub fn new() -> GameFeedViewItemBuilder<S, game_feed_view_item_state::Empty> {
GameFeedViewItemBuilder::new()
}
}
impl<S: BosStr> GameFeedViewItemBuilder<S, game_feed_view_item_state::Empty> {
pub fn new() -> Self {
GameFeedViewItemBuilder {
_state: PhantomData,
_fields: (None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_feed_view_item_state::State> GameFeedViewItemBuilder<S, St> {
pub fn feed_context(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_feed_context(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> GameFeedViewItemBuilder<S, St>
where
St: game_feed_view_item_state::State,
St::Game: game_feed_view_item_state::IsUnset,
{
pub fn game(
mut self,
value: impl Into<games_gamesgamesgamesgames::GameView<S>>,
) -> GameFeedViewItemBuilder<S, game_feed_view_item_state::SetGame<St>> {
self._fields.1 = Option::Some(value.into());
GameFeedViewItemBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> GameFeedViewItemBuilder<S, St>
where
St: game_feed_view_item_state::State,
St::Game: game_feed_view_item_state::IsSet,
{
pub fn build(self) -> GameFeedViewItem<S> {
GameFeedViewItem {
feed_context: self._fields.0,
game: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> GameFeedViewItem<S> {
GameFeedViewItem {
feed_context: self._fields.0,
game: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod game_summary_view_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 Uri;
type Name;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Name = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Name = St::Name;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Uri = St::Uri;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
}
}
pub struct GameSummaryViewBuilder<S: BosStr, St: game_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<games_gamesgamesgamesgames::ApplicationType<S>>,
Option<i64>,
Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
Option<S>,
Option<S>,
Option<S>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> GameSummaryView<S> {
pub fn new() -> GameSummaryViewBuilder<S, game_summary_view_state::Empty> {
GameSummaryViewBuilder::new()
}
}
impl<S: BosStr> GameSummaryViewBuilder<S, game_summary_view_state::Empty> {
pub fn new() -> Self {
GameSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_summary_view_state::State> GameSummaryViewBuilder<S, St> {
pub fn application_type(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::ApplicationType<S>>>,
) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_application_type(
mut self,
value: Option<games_gamesgamesgamesgames::ApplicationType<S>>,
) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: game_summary_view_state::State> GameSummaryViewBuilder<S, St> {
pub fn first_release_date(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_first_release_date(mut self, value: Option<i64>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: game_summary_view_state::State> GameSummaryViewBuilder<S, St> {
pub fn media(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>>,
) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> GameSummaryViewBuilder<S, St>
where
St: game_summary_view_state::State,
St::Name: game_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<S>,
) -> GameSummaryViewBuilder<S, game_summary_view_state::SetName<St>> {
self._fields.3 = Option::Some(value.into());
GameSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_summary_view_state::State> GameSummaryViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St: game_summary_view_state::State> GameSummaryViewBuilder<S, St> {
pub fn summary(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<S>) -> Self {
self._fields.5 = value;
self
}
}
impl<S: BosStr, St> GameSummaryViewBuilder<S, St>
where
St: game_summary_view_state::State,
St::Uri: game_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> GameSummaryViewBuilder<S, game_summary_view_state::SetUri<St>> {
self._fields.6 = Option::Some(value.into());
GameSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> GameSummaryViewBuilder<S, St>
where
St: game_summary_view_state::State,
St::Uri: game_summary_view_state::IsSet,
St::Name: game_summary_view_state::IsSet,
{
pub fn build(self) -> GameSummaryView<S> {
GameSummaryView {
application_type: self._fields.0,
first_release_date: self._fields.1,
media: self._fields.2,
name: self._fields.3.unwrap(),
slug: self._fields.4,
summary: self._fields.5,
uri: self._fields.6.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> GameSummaryView<S> {
GameSummaryView {
application_type: self._fields.0,
first_release_date: self._fields.1,
media: self._fields.2,
name: self._fields.3.unwrap(),
slug: self._fields.4,
summary: self._fields.5,
uri: self._fields.6.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod game_view_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 Uri;
type Name;
type ApplicationType;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Name = Unset;
type ApplicationType = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Name = St::Name;
type ApplicationType = St::ApplicationType;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Uri = St::Uri;
type Name = Set<members::name>;
type ApplicationType = St::ApplicationType;
}
pub struct SetApplicationType<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetApplicationType<St> {}
impl<St: State> State for SetApplicationType<St> {
type Uri = St::Uri;
type Name = St::Name;
type ApplicationType = Set<members::application_type>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
pub struct application_type(());
}
}
pub struct GameViewBuilder<S: BosStr, St: game_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<games_gamesgamesgamesgames::ApplicationType<S>>,
Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
Option<i64>,
Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
Option<S>,
Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
Option<S>,
Option<S>,
Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
Option<AtUri<S>>,
Option<games_gamesgamesgamesgames::ViewerState<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> GameView<S> {
pub fn new() -> GameViewBuilder<S, game_view_state::Empty> {
GameViewBuilder::new()
}
}
impl<S: BosStr> GameViewBuilder<S, game_view_state::Empty> {
pub fn new() -> Self {
GameViewBuilder {
_state: PhantomData,
_fields: (
None, None, None, None, None, None, None, None, None, None, None,
),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> GameViewBuilder<S, St>
where
St: game_view_state::State,
St::ApplicationType: game_view_state::IsUnset,
{
pub fn application_type(
mut self,
value: impl Into<games_gamesgamesgamesgames::ApplicationType<S>>,
) -> GameViewBuilder<S, game_view_state::SetApplicationType<St>> {
self._fields.0 = Option::Some(value.into());
GameViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn genres(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Genre<S>>>>,
) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_genres(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Genre<S>>>,
) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn media(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>>,
) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St> GameViewBuilder<S, St>
where
St: game_view_state::State,
St::Name: game_view_state::IsUnset,
{
pub fn name(mut self, value: impl Into<S>) -> GameViewBuilder<S, game_view_state::SetName<St>> {
self._fields.4 = Option::Some(value.into());
GameViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn releases(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Release<S>>>>,
) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_releases(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Release<S>>>,
) -> Self {
self._fields.5 = value;
self
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn summary(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.7 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<S>) -> Self {
self._fields.7 = value;
self
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn themes(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Theme<S>>>>,
) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_themes(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Theme<S>>>,
) -> Self {
self._fields.8 = value;
self
}
}
impl<S: BosStr, St> GameViewBuilder<S, St>
where
St: game_view_state::State,
St::Uri: game_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> GameViewBuilder<S, game_view_state::SetUri<St>> {
self._fields.9 = Option::Some(value.into());
GameViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: game_view_state::State> GameViewBuilder<S, St> {
pub fn viewer(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::ViewerState<S>>>,
) -> Self {
self._fields.10 = value.into();
self
}
pub fn maybe_viewer(
mut self,
value: Option<games_gamesgamesgamesgames::ViewerState<S>>,
) -> Self {
self._fields.10 = value;
self
}
}
impl<S: BosStr, St> GameViewBuilder<S, St>
where
St: game_view_state::State,
St::Uri: game_view_state::IsSet,
St::Name: game_view_state::IsSet,
St::ApplicationType: game_view_state::IsSet,
{
pub fn build(self) -> GameView<S> {
GameView {
application_type: self._fields.0.unwrap(),
genres: self._fields.1,
like_count: self._fields.2,
media: self._fields.3,
name: self._fields.4.unwrap(),
releases: self._fields.5,
slug: self._fields.6,
summary: self._fields.7,
themes: self._fields.8,
uri: self._fields.9.unwrap(),
viewer: self._fields.10,
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> GameView<S> {
GameView {
application_type: self._fields.0.unwrap(),
genres: self._fields.1,
like_count: self._fields.2,
media: self._fields.3,
name: self._fields.4.unwrap(),
releases: self._fields.5,
slug: self._fields.6,
summary: self._fields.7,
themes: self._fields.8,
uri: self._fields.9.unwrap(),
viewer: self._fields.10,
extra_data: Some(extra_data),
}
}
}
pub mod org_credit_view_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 Uri;
type Roles;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Roles = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Roles = St::Roles;
}
pub struct SetRoles<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetRoles<St> {}
impl<St: State> State for SetRoles<St> {
type Uri = St::Uri;
type Roles = Set<members::roles>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct roles(());
}
}
pub struct OrgCreditViewBuilder<S: BosStr, St: org_credit_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<S>,
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::CompanyRole<S>>>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> OrgCreditView<S> {
pub fn new() -> OrgCreditViewBuilder<S, org_credit_view_state::Empty> {
OrgCreditViewBuilder::new()
}
}
impl<S: BosStr> OrgCreditViewBuilder<S, org_credit_view_state::Empty> {
pub fn new() -> Self {
OrgCreditViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_credit_view_state::State> OrgCreditViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: org_credit_view_state::State> OrgCreditViewBuilder<S, St> {
pub fn org_uri(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_org_uri(mut self, value: Option<AtUri<S>>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St> OrgCreditViewBuilder<S, St>
where
St: org_credit_view_state::State,
St::Roles: org_credit_view_state::IsUnset,
{
pub fn roles(
mut self,
value: impl Into<Vec<games_gamesgamesgamesgames::CompanyRole<S>>>,
) -> OrgCreditViewBuilder<S, org_credit_view_state::SetRoles<St>> {
self._fields.2 = Option::Some(value.into());
OrgCreditViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> OrgCreditViewBuilder<S, St>
where
St: org_credit_view_state::State,
St::Uri: org_credit_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> OrgCreditViewBuilder<S, org_credit_view_state::SetUri<St>> {
self._fields.3 = Option::Some(value.into());
OrgCreditViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> OrgCreditViewBuilder<S, St>
where
St: org_credit_view_state::State,
St::Uri: org_credit_view_state::IsSet,
St::Roles: org_credit_view_state::IsSet,
{
pub fn build(self) -> OrgCreditView<S> {
OrgCreditView {
display_name: self._fields.0,
org_uri: self._fields.1,
roles: self._fields.2.unwrap(),
uri: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> OrgCreditView<S> {
OrgCreditView {
display_name: self._fields.0,
org_uri: self._fields.1,
roles: self._fields.2.unwrap(),
uri: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod org_profile_detail_view_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 Did;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Did = Unset;
type Uri = Unset;
}
pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetDid<St> {}
impl<St: State> State for SetDid<St> {
type Did = Set<members::did>;
type Uri = St::Uri;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Did = St::Did;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
pub struct uri(());
}
}
pub struct OrgProfileDetailViewBuilder<S: BosStr, St: org_profile_detail_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<BlobRef<S>>,
Option<S>,
Option<Datetime>,
Option<S>,
Option<Vec<Facet<S>>>,
Option<Did<S>>,
Option<S>,
Option<Datetime>,
Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
Option<AtUri<S>>,
Option<OrgProfileDetailViewStatus<S>>,
Option<AtUri<S>>,
Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> OrgProfileDetailView<S> {
pub fn new() -> OrgProfileDetailViewBuilder<S, org_profile_detail_view_state::Empty> {
OrgProfileDetailViewBuilder::new()
}
}
impl<S: BosStr> OrgProfileDetailViewBuilder<S, org_profile_detail_view_state::Empty> {
pub fn new() -> Self {
OrgProfileDetailViewBuilder {
_state: PhantomData,
_fields: (
None, None, None, None, None, None, None, None, None, None, None, None, None,
),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn avatar(mut self, value: impl Into<Option<BlobRef<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_avatar(mut self, value: Option<BlobRef<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn country(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_country(mut self, value: Option<S>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn description(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_description(mut self, value: Option<S>) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn description_facets(mut self, value: impl Into<Option<Vec<Facet<S>>>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_description_facets(mut self, value: Option<Vec<Facet<S>>>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St> OrgProfileDetailViewBuilder<S, St>
where
St: org_profile_detail_view_state::State,
St::Did: org_profile_detail_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<Did<S>>,
) -> OrgProfileDetailViewBuilder<S, org_profile_detail_view_state::SetDid<St>> {
self._fields.5 = Option::Some(value.into());
OrgProfileDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn founded_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.7 = value.into();
self
}
pub fn maybe_founded_at(mut self, value: Option<Datetime>) -> Self {
self._fields.7 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn media(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>>,
) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::MediaItem<S>>>,
) -> Self {
self._fields.8 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn parent(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
self._fields.9 = value.into();
self
}
pub fn maybe_parent(mut self, value: Option<AtUri<S>>) -> Self {
self._fields.9 = value;
self
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn status(mut self, value: impl Into<Option<OrgProfileDetailViewStatus<S>>>) -> Self {
self._fields.10 = value.into();
self
}
pub fn maybe_status(mut self, value: Option<OrgProfileDetailViewStatus<S>>) -> Self {
self._fields.10 = value;
self
}
}
impl<S: BosStr, St> OrgProfileDetailViewBuilder<S, St>
where
St: org_profile_detail_view_state::State,
St::Uri: org_profile_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> OrgProfileDetailViewBuilder<S, org_profile_detail_view_state::SetUri<St>> {
self._fields.11 = Option::Some(value.into());
OrgProfileDetailViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<S, St> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<games_gamesgamesgamesgames::Website<S>>>>,
) -> Self {
self._fields.12 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<games_gamesgamesgamesgames::Website<S>>>,
) -> Self {
self._fields.12 = value;
self
}
}
impl<S: BosStr, St> OrgProfileDetailViewBuilder<S, St>
where
St: org_profile_detail_view_state::State,
St::Did: org_profile_detail_view_state::IsSet,
St::Uri: org_profile_detail_view_state::IsSet,
{
pub fn build(self) -> OrgProfileDetailView<S> {
OrgProfileDetailView {
avatar: self._fields.0,
country: self._fields.1,
created_at: self._fields.2,
description: self._fields.3,
description_facets: self._fields.4,
did: self._fields.5.unwrap(),
display_name: self._fields.6,
founded_at: self._fields.7,
media: self._fields.8,
parent: self._fields.9,
status: self._fields.10,
uri: self._fields.11.unwrap(),
websites: self._fields.12,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> OrgProfileDetailView<S> {
OrgProfileDetailView {
avatar: self._fields.0,
country: self._fields.1,
created_at: self._fields.2,
description: self._fields.3,
description_facets: self._fields.4,
did: self._fields.5.unwrap(),
display_name: self._fields.6,
founded_at: self._fields.7,
media: self._fields.8,
parent: self._fields.9,
status: self._fields.10,
uri: self._fields.11.unwrap(),
websites: self._fields.12,
extra_data: Some(extra_data),
}
}
}
pub mod org_profile_summary_view_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 Uri;
type Did;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Did = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Did = St::Did;
}
pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetDid<St> {}
impl<St: State> State for SetDid<St> {
type Uri = St::Uri;
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct did(());
}
}
pub struct OrgProfileSummaryViewBuilder<S: BosStr, St: org_profile_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<BlobRef<S>>,
Option<Did<S>>,
Option<S>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> OrgProfileSummaryView<S> {
pub fn new() -> OrgProfileSummaryViewBuilder<S, org_profile_summary_view_state::Empty> {
OrgProfileSummaryViewBuilder::new()
}
}
impl<S: BosStr> OrgProfileSummaryViewBuilder<S, org_profile_summary_view_state::Empty> {
pub fn new() -> Self {
OrgProfileSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_profile_summary_view_state::State> OrgProfileSummaryViewBuilder<S, St> {
pub fn avatar(mut self, value: impl Into<Option<BlobRef<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_avatar(mut self, value: Option<BlobRef<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> OrgProfileSummaryViewBuilder<S, St>
where
St: org_profile_summary_view_state::State,
St::Did: org_profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<Did<S>>,
) -> OrgProfileSummaryViewBuilder<S, org_profile_summary_view_state::SetDid<St>> {
self._fields.1 = Option::Some(value.into());
OrgProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: org_profile_summary_view_state::State> OrgProfileSummaryViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> OrgProfileSummaryViewBuilder<S, St>
where
St: org_profile_summary_view_state::State,
St::Uri: org_profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> OrgProfileSummaryViewBuilder<S, org_profile_summary_view_state::SetUri<St>> {
self._fields.3 = Option::Some(value.into());
OrgProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> OrgProfileSummaryViewBuilder<S, St>
where
St: org_profile_summary_view_state::State,
St::Uri: org_profile_summary_view_state::IsSet,
St::Did: org_profile_summary_view_state::IsSet,
{
pub fn build(self) -> OrgProfileSummaryView<S> {
OrgProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> OrgProfileSummaryView<S> {
OrgProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
uri: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod platform_features_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 Features;
type Platform;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Features = Unset;
type Platform = Unset;
}
pub struct SetFeatures<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetFeatures<St> {}
impl<St: State> State for SetFeatures<St> {
type Features = Set<members::features>;
type Platform = St::Platform;
}
pub struct SetPlatform<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetPlatform<St> {}
impl<St: State> State for SetPlatform<St> {
type Features = St::Features;
type Platform = Set<members::platform>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct features(());
pub struct platform(());
}
}
pub struct PlatformFeaturesBuilder<S: BosStr, St: platform_features_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<Vec<S>>, Option<PlatformFeaturesPlatform<S>>),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> PlatformFeatures<S> {
pub fn new() -> PlatformFeaturesBuilder<S, platform_features_state::Empty> {
PlatformFeaturesBuilder::new()
}
}
impl<S: BosStr> PlatformFeaturesBuilder<S, platform_features_state::Empty> {
pub fn new() -> Self {
PlatformFeaturesBuilder {
_state: PhantomData,
_fields: (None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> PlatformFeaturesBuilder<S, St>
where
St: platform_features_state::State,
St::Features: platform_features_state::IsUnset,
{
pub fn features(
mut self,
value: impl Into<Vec<S>>,
) -> PlatformFeaturesBuilder<S, platform_features_state::SetFeatures<St>> {
self._fields.0 = Option::Some(value.into());
PlatformFeaturesBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> PlatformFeaturesBuilder<S, St>
where
St: platform_features_state::State,
St::Platform: platform_features_state::IsUnset,
{
pub fn platform(
mut self,
value: impl Into<PlatformFeaturesPlatform<S>>,
) -> PlatformFeaturesBuilder<S, platform_features_state::SetPlatform<St>> {
self._fields.1 = Option::Some(value.into());
PlatformFeaturesBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> PlatformFeaturesBuilder<S, St>
where
St: platform_features_state::State,
St::Features: platform_features_state::IsSet,
St::Platform: platform_features_state::IsSet,
{
pub fn build(self) -> PlatformFeatures<S> {
PlatformFeatures {
features: self._fields.0.unwrap(),
platform: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> PlatformFeatures<S> {
PlatformFeatures {
features: self._fields.0.unwrap(),
platform: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod platform_summary_view_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 Uri;
type Name;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Name = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Name = St::Name;
}
pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetName<St> {}
impl<St: State> State for SetName<St> {
type Uri = St::Uri;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
}
}
pub struct PlatformSummaryViewBuilder<S: BosStr, St: platform_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<S>,
Option<games_gamesgamesgamesgames::PlatformCategory<S>>,
Option<S>,
Option<S>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> PlatformSummaryView<S> {
pub fn new() -> PlatformSummaryViewBuilder<S, platform_summary_view_state::Empty> {
PlatformSummaryViewBuilder::new()
}
}
impl<S: BosStr> PlatformSummaryViewBuilder<S, platform_summary_view_state::Empty> {
pub fn new() -> Self {
PlatformSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: platform_summary_view_state::State> PlatformSummaryViewBuilder<S, St> {
pub fn abbreviation(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_abbreviation(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: platform_summary_view_state::State> PlatformSummaryViewBuilder<S, St> {
pub fn category(
mut self,
value: impl Into<Option<games_gamesgamesgamesgames::PlatformCategory<S>>>,
) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_category(
mut self,
value: Option<games_gamesgamesgamesgames::PlatformCategory<S>>,
) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St> PlatformSummaryViewBuilder<S, St>
where
St: platform_summary_view_state::State,
St::Name: platform_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<S>,
) -> PlatformSummaryViewBuilder<S, platform_summary_view_state::SetName<St>> {
self._fields.2 = Option::Some(value.into());
PlatformSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: platform_summary_view_state::State> PlatformSummaryViewBuilder<S, St> {
pub fn slug(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<S>) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St> PlatformSummaryViewBuilder<S, St>
where
St: platform_summary_view_state::State,
St::Uri: platform_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> PlatformSummaryViewBuilder<S, platform_summary_view_state::SetUri<St>> {
self._fields.4 = Option::Some(value.into());
PlatformSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> PlatformSummaryViewBuilder<S, St>
where
St: platform_summary_view_state::State,
St::Uri: platform_summary_view_state::IsSet,
St::Name: platform_summary_view_state::IsSet,
{
pub fn build(self) -> PlatformSummaryView<S> {
PlatformSummaryView {
abbreviation: self._fields.0,
category: self._fields.1,
name: self._fields.2.unwrap(),
slug: self._fields.3,
uri: self._fields.4.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> PlatformSummaryView<S> {
PlatformSummaryView {
abbreviation: self._fields.0,
category: self._fields.1,
name: self._fields.2.unwrap(),
slug: self._fields.3,
uri: self._fields.4.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod profile_summary_view_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 Uri;
type Did;
type ProfileType;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Did = Unset;
type ProfileType = Unset;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Uri = Set<members::uri>;
type Did = St::Did;
type ProfileType = St::ProfileType;
}
pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetDid<St> {}
impl<St: State> State for SetDid<St> {
type Uri = St::Uri;
type Did = Set<members::did>;
type ProfileType = St::ProfileType;
}
pub struct SetProfileType<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetProfileType<St> {}
impl<St: State> State for SetProfileType<St> {
type Uri = St::Uri;
type Did = St::Did;
type ProfileType = Set<members::profile_type>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct did(());
pub struct profile_type(());
}
}
pub struct ProfileSummaryViewBuilder<S: BosStr, St: profile_summary_view_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<BlobRef<S>>,
Option<Did<S>>,
Option<S>,
Option<ProfileSummaryViewProfileType<S>>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> ProfileSummaryView<S> {
pub fn new() -> ProfileSummaryViewBuilder<S, profile_summary_view_state::Empty> {
ProfileSummaryViewBuilder::new()
}
}
impl<S: BosStr> ProfileSummaryViewBuilder<S, profile_summary_view_state::Empty> {
pub fn new() -> Self {
ProfileSummaryViewBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: profile_summary_view_state::State> ProfileSummaryViewBuilder<S, St> {
pub fn avatar(mut self, value: impl Into<Option<BlobRef<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_avatar(mut self, value: Option<BlobRef<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> ProfileSummaryViewBuilder<S, St>
where
St: profile_summary_view_state::State,
St::Did: profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<Did<S>>,
) -> ProfileSummaryViewBuilder<S, profile_summary_view_state::SetDid<St>> {
self._fields.1 = Option::Some(value.into());
ProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: profile_summary_view_state::State> ProfileSummaryViewBuilder<S, St> {
pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> ProfileSummaryViewBuilder<S, St>
where
St: profile_summary_view_state::State,
St::ProfileType: profile_summary_view_state::IsUnset,
{
pub fn profile_type(
mut self,
value: impl Into<ProfileSummaryViewProfileType<S>>,
) -> ProfileSummaryViewBuilder<S, profile_summary_view_state::SetProfileType<St>> {
self._fields.3 = Option::Some(value.into());
ProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> ProfileSummaryViewBuilder<S, St>
where
St: profile_summary_view_state::State,
St::Uri: profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> ProfileSummaryViewBuilder<S, profile_summary_view_state::SetUri<St>> {
self._fields.4 = Option::Some(value.into());
ProfileSummaryViewBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> ProfileSummaryViewBuilder<S, St>
where
St: profile_summary_view_state::State,
St::Uri: profile_summary_view_state::IsSet,
St::Did: profile_summary_view_state::IsSet,
St::ProfileType: profile_summary_view_state::IsSet,
{
pub fn build(self) -> ProfileSummaryView<S> {
ProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
profile_type: self._fields.3.unwrap(),
uri: self._fields.4.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ProfileSummaryView<S> {
ProfileSummaryView {
avatar: self._fields.0,
did: self._fields.1.unwrap(),
display_name: self._fields.2,
profile_type: self._fields.3.unwrap(),
uri: self._fields.4.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod skeleton_game_feed_item_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 Game;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Game = Unset;
}
pub struct SetGame<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetGame<St> {}
impl<St: State> State for SetGame<St> {
type Game = Set<members::game>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct game(());
}
}
pub struct SkeletonGameFeedItemBuilder<S: BosStr, St: skeleton_game_feed_item_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<S>, Option<AtUri<S>>),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> SkeletonGameFeedItem<S> {
pub fn new() -> SkeletonGameFeedItemBuilder<S, skeleton_game_feed_item_state::Empty> {
SkeletonGameFeedItemBuilder::new()
}
}
impl<S: BosStr> SkeletonGameFeedItemBuilder<S, skeleton_game_feed_item_state::Empty> {
pub fn new() -> Self {
SkeletonGameFeedItemBuilder {
_state: PhantomData,
_fields: (None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: skeleton_game_feed_item_state::State> SkeletonGameFeedItemBuilder<S, St> {
pub fn feed_context(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_feed_context(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> SkeletonGameFeedItemBuilder<S, St>
where
St: skeleton_game_feed_item_state::State,
St::Game: skeleton_game_feed_item_state::IsUnset,
{
pub fn game(
mut self,
value: impl Into<AtUri<S>>,
) -> SkeletonGameFeedItemBuilder<S, skeleton_game_feed_item_state::SetGame<St>> {
self._fields.1 = Option::Some(value.into());
SkeletonGameFeedItemBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> SkeletonGameFeedItemBuilder<S, St>
where
St: skeleton_game_feed_item_state::State,
St::Game: skeleton_game_feed_item_state::IsSet,
{
pub fn build(self) -> SkeletonGameFeedItem<S> {
SkeletonGameFeedItem {
feed_context: self._fields.0,
game: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> SkeletonGameFeedItem<S> {
SkeletonGameFeedItem {
feed_context: self._fields.0,
game: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod website_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 Url;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Url = Unset;
}
pub struct SetUrl<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUrl<St> {}
impl<St: State> State for SetUrl<St> {
type Url = Set<members::url>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct url(());
}
}
pub struct WebsiteBuilder<S: BosStr, St: website_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<WebsiteType<S>>, Option<UriValue<S>>),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> Website<S> {
pub fn new() -> WebsiteBuilder<S, website_state::Empty> {
WebsiteBuilder::new()
}
}
impl<S: BosStr> WebsiteBuilder<S, website_state::Empty> {
pub fn new() -> Self {
WebsiteBuilder {
_state: PhantomData,
_fields: (None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: website_state::State> WebsiteBuilder<S, St> {
pub fn r#type(mut self, value: impl Into<Option<WebsiteType<S>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_type(mut self, value: Option<WebsiteType<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St> WebsiteBuilder<S, St>
where
St: website_state::State,
St::Url: website_state::IsUnset,
{
pub fn url(
mut self,
value: impl Into<UriValue<S>>,
) -> WebsiteBuilder<S, website_state::SetUrl<St>> {
self._fields.1 = Option::Some(value.into());
WebsiteBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> WebsiteBuilder<S, St>
where
St: website_state::State,
St::Url: website_state::IsSet,
{
pub fn build(self) -> Website<S> {
Website {
r#type: self._fields.0,
url: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Website<S> {
Website {
r#type: self._fields.0,
url: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}