pub mod actor;
pub mod collection;
pub mod create_game;
pub mod engine;
pub mod feed;
pub mod game;
pub mod get_game;
pub mod get_profile;
pub mod get_reviews;
pub mod graph;
pub mod list_games;
pub mod org;
pub mod platform;
pub mod platform_family;
pub mod put_game;
pub mod search;
pub mod search_profiles_typeahead;
pub mod search_slugs;
pub mod slug;
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct ActorProfileDetailView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description_facets: std::option::Option<
Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
>,
#[serde(borrow)]
pub did: jacquard_common::types::string::Did<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub pronouns: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub websites: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::Website<'a>>,
>,
}
pub mod actor_profile_detail_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Did = Set<members::did>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Did = S::Did;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
pub struct uri(());
}
}
pub struct ActorProfileDetailViewBuilder<'a, S: actor_profile_detail_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ActorProfileDetailView<'a> {
pub fn new() -> ActorProfileDetailViewBuilder<
'a,
actor_profile_detail_view_state::Empty,
> {
ActorProfileDetailViewBuilder::new()
}
}
impl<'a> ActorProfileDetailViewBuilder<'a, actor_profile_detail_view_state::Empty> {
pub fn new() -> Self {
ActorProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (
None,
None,
None,
None,
None,
None,
None,
None,
None,
),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::blob::BlobRef<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn created_at(
mut self,
value: impl Into<Option<jacquard_common::types::string::Datetime>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_created_at(
mut self,
value: Option<jacquard_common::types::string::Datetime>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn description(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_description(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn description_facets(
mut self,
value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_description_facets(
mut self,
value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> ActorProfileDetailViewBuilder<'a, S>
where
S: actor_profile_detail_view_state::State,
S::Did: actor_profile_detail_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> ActorProfileDetailViewBuilder<'a, actor_profile_detail_view_state::SetDid<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
ActorProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn display_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_display_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn pronouns(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_pronouns(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.6 = value;
self
}
}
impl<'a, S> ActorProfileDetailViewBuilder<'a, S>
where
S: actor_profile_detail_view_state::State,
S::Uri: actor_profile_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> ActorProfileDetailViewBuilder<'a, actor_profile_detail_view_state::SetUri<S>> {
self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
ActorProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<
'a,
S: actor_profile_detail_view_state::State,
> ActorProfileDetailViewBuilder<'a, S> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>>,
) -> Self {
self.__unsafe_private_named.8 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
) -> Self {
self.__unsafe_private_named.8 = value;
self
}
}
impl<'a, S> ActorProfileDetailViewBuilder<'a, S>
where
S: actor_profile_detail_view_state::State,
S::Did: actor_profile_detail_view_state::IsSet,
S::Uri: actor_profile_detail_view_state::IsSet,
{
pub fn build(self) -> ActorProfileDetailView<'a> {
ActorProfileDetailView {
avatar: self.__unsafe_private_named.0,
created_at: self.__unsafe_private_named.1,
description: self.__unsafe_private_named.2,
description_facets: self.__unsafe_private_named.3,
did: self.__unsafe_private_named.4.unwrap(),
display_name: self.__unsafe_private_named.5,
pronouns: self.__unsafe_private_named.6,
uri: self.__unsafe_private_named.7.unwrap(),
websites: self.__unsafe_private_named.8,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> ActorProfileDetailView<'a> {
ActorProfileDetailView {
avatar: self.__unsafe_private_named.0,
created_at: self.__unsafe_private_named.1,
description: self.__unsafe_private_named.2,
description_facets: self.__unsafe_private_named.3,
did: self.__unsafe_private_named.4.unwrap(),
display_name: self.__unsafe_private_named.5,
pronouns: self.__unsafe_private_named.6,
uri: self.__unsafe_private_named.7.unwrap(),
websites: self.__unsafe_private_named.8,
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_games_gamesgamesgamesgames_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc<
'static,
> {
::jacquard_lexicon::lexicon::LexiconDoc {
lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
id: ::jacquard_common::CowStr::new_static("games.gamesgamesgamesgames.defs"),
revision: None,
description: None,
defs: {
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"actorProfileDetailView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"avatar",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"createdAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"description",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(3000usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"descriptionFacets",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"app.bsky.richtext.facet",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"did",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Did,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"displayName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"pronouns",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(200usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"websites",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
}),
min_length: None,
max_length: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"actorProfileSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"avatar",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"did",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Did,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"displayName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("ageRating"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("organization"),
::jacquard_common::deps::smol_str::SmolStr::new_static("rating")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"contentDescriptors",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"organization",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"rating",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"alternativeName",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"comment",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"locale",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"applicationType",
),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"collectionSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"type",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("companyRole"),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("creditEntry"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("role")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"department",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"role",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#individualRole",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"engineSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("externalIds"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"appleAppStore",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"epicGames",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"gog",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"googlePlay",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"humbleBundle",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"igdb",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"itchIo",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#itchIoId",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"nintendoEshop",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"playStation",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"steam",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"xbox",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("externalVideo"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("videoId"),
::jacquard_common::deps::smol_str::SmolStr::new_static("platform")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platform",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"title",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"videoId",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("gameDetailView"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("name"),
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("createdAt")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"ageRatings",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#ageRating",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"alternativeNames",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#alternativeName",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"applicationType",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"collections",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"createdAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"engines",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"externalIds",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#externalIds",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"genres",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#genre",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"keywords",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"languageSupports",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#languageSupport",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"media",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"modes",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mode",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"multiplayerModes",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#multiplayerMode",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"parent",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"playerPerspectives",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#playerPerspective",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"publishedAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"releases",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#release",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"storyline",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"summary",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"themes",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#theme",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"timeToBeat",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#timeToBeat",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"videos",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#externalVideo",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"websites",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
}),
min_length: None,
max_length: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"gameFeedViewItem",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("game")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"feedContext",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(2000usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"game",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#gameView",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"gameSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"applicationType",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"firstReleaseDate",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"media",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"summary",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("gameView"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("name"),
::jacquard_common::deps::smol_str::SmolStr::new_static("applicationType")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"applicationType",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#applicationType",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"genres",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#genre",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"likeCount",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: Some(0i64),
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"media",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"releases",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#release",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"summary",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"themes",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#theme",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"viewer",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#viewerState",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("genre"),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("individualRole"),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("itchIoId"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("developer"),
::jacquard_common::deps::smol_str::SmolStr::new_static("game")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"developer",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"game",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"languageSupport",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("language")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"audio",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interface",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"language",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"subtitles",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("mediaItem"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"blob",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"description",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"height",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"locale",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"mediaType",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"title",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"width",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("mode"),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"multiplayerMode",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hasCampaignCoop",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hasDropIn",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hasLanCoop",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hasSplitscreen",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hasSplitscreenOnline",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
description: None,
default: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"offlineCoopMax",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"offlineMax",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"onlineCoopMax",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"onlineMax",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platform",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"orgProfileDetailView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"avatar",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"country",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"createdAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"description",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(3000usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"descriptionFacets",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"app.bsky.richtext.facet",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"did",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Did,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"displayName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"foundedAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"media",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"parent",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"status",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"websites",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#website",
),
}),
min_length: None,
max_length: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"orgProfileSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"avatar",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"did",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Did,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"displayName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platformCategory",
),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platformFeatures",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"Features supported by a game on a specific storefront/platform.",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("platform"),
::jacquard_common::deps::smol_str::SmolStr::new_static("features")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"features",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platform",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platformSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"abbreviation",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"category",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#platformCategory",
),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"slug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platformVersion",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("name")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"connectivity",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"cpu",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"gpu",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"maxResolution",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"media",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#mediaItem",
),
}),
min_length: None,
max_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"memory",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("os"),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"output",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"storage",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"summary",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"playerPerspective",
),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"profileSummaryView",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did"),
::jacquard_common::deps::smol_str::SmolStr::new_static("profileType")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"avatar",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
description: None,
accept: None,
max_size: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"did",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Did,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"displayName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(640usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"profileType",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("release"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platform",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"Free-text platform name, used when no platform record exists.",
),
),
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platformUri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"AT URI of a platform record.",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"releaseDates",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"games.gamesgamesgamesgames.defs#releaseDate",
),
}),
min_length: None,
max_length: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("releaseDate"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"region",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"releasedAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"releasedAtFormat",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"status",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"skeletonGameFeedItem",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("game")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"feedContext",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(2000usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"game",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"systemRequirements",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"System requirements for a game on a specific platform.",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("platform")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"minimum",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#systemSpec"),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"platform",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"recommended",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#systemSpec"),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("systemSpec"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"Hardware/software specification for a platform.",
),
),
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"additionalNotes",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"directx",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"graphics",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"memory",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("os"),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"processor",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"soundCard",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"storage",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("theme"),
::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("timeToBeat"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"completely",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"hastily",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"normally",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
description: None,
default: None,
minimum: None,
maximum: None,
r#enum: None,
r#const: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("viewerState"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"like",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("website"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("url")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"type",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"url",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Uri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map
},
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ActorProfileDetailView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"actorProfileDetailView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"pronouns",
),
max: 200usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct ActorProfileSummaryView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(borrow)]
pub did: jacquard_common::types::string::Did<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod actor_profile_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Did = S::Did;
}
pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Uri = S::Uri;
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct did(());
}
}
pub struct ActorProfileSummaryViewBuilder<
'a,
S: actor_profile_summary_view_state::State,
> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ActorProfileSummaryView<'a> {
pub fn new() -> ActorProfileSummaryViewBuilder<
'a,
actor_profile_summary_view_state::Empty,
> {
ActorProfileSummaryViewBuilder::new()
}
}
impl<'a> ActorProfileSummaryViewBuilder<'a, actor_profile_summary_view_state::Empty> {
pub fn new() -> Self {
ActorProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<
'a,
S: actor_profile_summary_view_state::State,
> ActorProfileSummaryViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::blob::BlobRef<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> ActorProfileSummaryViewBuilder<'a, S>
where
S: actor_profile_summary_view_state::State,
S::Did: actor_profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> ActorProfileSummaryViewBuilder<
'a,
actor_profile_summary_view_state::SetDid<S>,
> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
ActorProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<
'a,
S: actor_profile_summary_view_state::State,
> ActorProfileSummaryViewBuilder<'a, S> {
pub fn display_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_display_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S> ActorProfileSummaryViewBuilder<'a, S>
where
S: actor_profile_summary_view_state::State,
S::Uri: actor_profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> ActorProfileSummaryViewBuilder<
'a,
actor_profile_summary_view_state::SetUri<S>,
> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
ActorProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> ActorProfileSummaryViewBuilder<'a, S>
where
S: actor_profile_summary_view_state::State,
S::Uri: actor_profile_summary_view_state::IsSet,
S::Did: actor_profile_summary_view_state::IsSet,
{
pub fn build(self) -> ActorProfileSummaryView<'a> {
ActorProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> ActorProfileSummaryView<'a> {
ActorProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ActorProfileSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"actorProfileSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"display_name",
),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct AgeRating<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub content_descriptors: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
#[serde(borrow)]
pub organization: AgeRatingOrganization<'a>,
#[serde(borrow)]
pub rating: jacquard_common::CowStr<'a>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum AgeRatingOrganization<'a> {
Esrb,
Pegi,
Cero,
Usk,
Grac,
ClassInd,
Acb,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> AgeRatingOrganization<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for AgeRatingOrganization<'a> {
fn from(s: &'a str) -> Self {
match s {
"esrb" => Self::Esrb,
"pegi" => Self::Pegi,
"cero" => Self::Cero,
"usk" => Self::Usk,
"grac" => Self::Grac,
"classInd" => Self::ClassInd,
"acb" => Self::Acb,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for AgeRatingOrganization<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"esrb" => Self::Esrb,
"pegi" => Self::Pegi,
"cero" => Self::Cero,
"usk" => Self::Usk,
"grac" => Self::Grac,
"classInd" => Self::ClassInd,
"acb" => Self::Acb,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for AgeRatingOrganization<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for AgeRatingOrganization<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for AgeRatingOrganization<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for AgeRatingOrganization<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for AgeRatingOrganization<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for AgeRatingOrganization<'_> {
type Output = AgeRatingOrganization<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AgeRating<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"ageRating"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct AlternativeName<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub comment: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub locale: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AlternativeName<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"alternativeName"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
pub type ApplicationType<'a> = jacquard_common::CowStr<'a>;
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct CollectionSummaryView<'a> {
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub r#type: std::option::Option<CollectionSummaryViewType<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod collection_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Name = S::Name;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Uri = S::Uri;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
}
}
pub struct CollectionSummaryViewBuilder<'a, S: collection_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<CollectionSummaryViewType<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> CollectionSummaryView<'a> {
pub fn new() -> CollectionSummaryViewBuilder<
'a,
collection_summary_view_state::Empty,
> {
CollectionSummaryViewBuilder::new()
}
}
impl<'a> CollectionSummaryViewBuilder<'a, collection_summary_view_state::Empty> {
pub fn new() -> Self {
CollectionSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> CollectionSummaryViewBuilder<'a, S>
where
S: collection_summary_view_state::State,
S::Name: collection_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> CollectionSummaryViewBuilder<'a, collection_summary_view_state::SetName<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
CollectionSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: collection_summary_view_state::State> CollectionSummaryViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: collection_summary_view_state::State> CollectionSummaryViewBuilder<'a, S> {
pub fn r#type(
mut self,
value: impl Into<Option<CollectionSummaryViewType<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_type(mut self, value: Option<CollectionSummaryViewType<'a>>) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S> CollectionSummaryViewBuilder<'a, S>
where
S: collection_summary_view_state::State,
S::Uri: collection_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> CollectionSummaryViewBuilder<'a, collection_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
CollectionSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> CollectionSummaryViewBuilder<'a, S>
where
S: collection_summary_view_state::State,
S::Uri: collection_summary_view_state::IsSet,
S::Name: collection_summary_view_state::IsSet,
{
pub fn build(self) -> CollectionSummaryView<'a> {
CollectionSummaryView {
name: self.__unsafe_private_named.0.unwrap(),
slug: self.__unsafe_private_named.1,
r#type: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> CollectionSummaryView<'a> {
CollectionSummaryView {
name: self.__unsafe_private_named.0.unwrap(),
slug: self.__unsafe_private_named.1,
r#type: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CollectionSummaryViewType<'a> {
Franchise,
Series,
Curated,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> CollectionSummaryViewType<'a> {
pub fn as_str(&self) -> &str {
match self {
Self::Franchise => "franchise",
Self::Series => "series",
Self::Curated => "curated",
Self::Other(s) => s.as_ref(),
}
}
}
impl<'a> From<&'a str> for CollectionSummaryViewType<'a> {
fn from(s: &'a str) -> Self {
match s {
"franchise" => Self::Franchise,
"series" => Self::Series,
"curated" => Self::Curated,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for CollectionSummaryViewType<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"franchise" => Self::Franchise,
"series" => Self::Series,
"curated" => Self::Curated,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for CollectionSummaryViewType<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for CollectionSummaryViewType<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for CollectionSummaryViewType<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for CollectionSummaryViewType<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for CollectionSummaryViewType<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for CollectionSummaryViewType<'_> {
type Output = CollectionSummaryViewType<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for CollectionSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"collectionSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CompanyRole<'a> {
Developer,
Publisher,
Porter,
Supporter,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> CompanyRole<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for CompanyRole<'a> {
fn from(s: &'a str) -> Self {
match s {
"developer" => Self::Developer,
"publisher" => Self::Publisher,
"porter" => Self::Porter,
"supporter" => Self::Supporter,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for CompanyRole<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"developer" => Self::Developer,
"publisher" => Self::Publisher,
"porter" => Self::Porter,
"supporter" => Self::Supporter,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for CompanyRole<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for CompanyRole<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for CompanyRole<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for CompanyRole<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for CompanyRole<'_> {
type Output = CompanyRole<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct CreditEntry<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub department: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub role: crate::games_gamesgamesgamesgames::IndividualRole<'a>,
}
pub mod credit_entry_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRole<S> {}
impl<S: State> State for SetRole<S> {
type Role = Set<members::role>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct role(());
}
}
pub struct CreditEntryBuilder<'a, S: credit_entry_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<crate::games_gamesgamesgamesgames::IndividualRole<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> CreditEntry<'a> {
pub fn new() -> CreditEntryBuilder<'a, credit_entry_state::Empty> {
CreditEntryBuilder::new()
}
}
impl<'a> CreditEntryBuilder<'a, credit_entry_state::Empty> {
pub fn new() -> Self {
CreditEntryBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: credit_entry_state::State> CreditEntryBuilder<'a, S> {
pub fn department(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_department(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> CreditEntryBuilder<'a, S>
where
S: credit_entry_state::State,
S::Role: credit_entry_state::IsUnset,
{
pub fn role(
mut self,
value: impl Into<crate::games_gamesgamesgamesgames::IndividualRole<'a>>,
) -> CreditEntryBuilder<'a, credit_entry_state::SetRole<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
CreditEntryBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> CreditEntryBuilder<'a, S>
where
S: credit_entry_state::State,
S::Role: credit_entry_state::IsSet,
{
pub fn build(self) -> CreditEntry<'a> {
CreditEntry {
department: self.__unsafe_private_named.0,
role: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> CreditEntry<'a> {
CreditEntry {
department: self.__unsafe_private_named.0,
role: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for CreditEntry<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"creditEntry"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.department {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 640usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"department",
),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct EngineSummaryView<'a> {
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod engine_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Name = Set<members::name>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Name = S::Name;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct name(());
pub struct uri(());
}
}
pub struct EngineSummaryViewBuilder<'a, S: engine_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> EngineSummaryView<'a> {
pub fn new() -> EngineSummaryViewBuilder<'a, engine_summary_view_state::Empty> {
EngineSummaryViewBuilder::new()
}
}
impl<'a> EngineSummaryViewBuilder<'a, engine_summary_view_state::Empty> {
pub fn new() -> Self {
EngineSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> EngineSummaryViewBuilder<'a, S>
where
S: engine_summary_view_state::State,
S::Name: engine_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> EngineSummaryViewBuilder<'a, engine_summary_view_state::SetName<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
EngineSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: engine_summary_view_state::State> EngineSummaryViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S> EngineSummaryViewBuilder<'a, S>
where
S: engine_summary_view_state::State,
S::Uri: engine_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> EngineSummaryViewBuilder<'a, engine_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
EngineSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> EngineSummaryViewBuilder<'a, S>
where
S: engine_summary_view_state::State,
S::Name: engine_summary_view_state::IsSet,
S::Uri: engine_summary_view_state::IsSet,
{
pub fn build(self) -> EngineSummaryView<'a> {
EngineSummaryView {
name: self.__unsafe_private_named.0.unwrap(),
slug: self.__unsafe_private_named.1,
uri: self.__unsafe_private_named.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> EngineSummaryView<'a> {
EngineSummaryView {
name: self.__unsafe_private_named.0.unwrap(),
slug: self.__unsafe_private_named.1,
uri: self.__unsafe_private_named.2.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for EngineSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"engineSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct ExternalIds<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub apple_app_store: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub epic_games: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub gog: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub google_play: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub humble_bundle: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub igdb: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub itch_io: std::option::Option<crate::games_gamesgamesgamesgames::ItchIoId<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub nintendo_eshop: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub play_station: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub steam: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub xbox: std::option::Option<jacquard_common::CowStr<'a>>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ExternalIds<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"externalIds"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct ExternalVideo<'a> {
#[serde(borrow)]
pub platform: ExternalVideoPlatform<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub title: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub video_id: jacquard_common::CowStr<'a>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ExternalVideoPlatform<'a> {
Youtube,
Twitch,
Vimeo,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> ExternalVideoPlatform<'a> {
pub fn as_str(&self) -> &str {
match self {
Self::Youtube => "youtube",
Self::Twitch => "twitch",
Self::Vimeo => "vimeo",
Self::Other(s) => s.as_ref(),
}
}
}
impl<'a> From<&'a str> for ExternalVideoPlatform<'a> {
fn from(s: &'a str) -> Self {
match s {
"youtube" => Self::Youtube,
"twitch" => Self::Twitch,
"vimeo" => Self::Vimeo,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for ExternalVideoPlatform<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"youtube" => Self::Youtube,
"twitch" => Self::Twitch,
"vimeo" => Self::Vimeo,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for ExternalVideoPlatform<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for ExternalVideoPlatform<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for ExternalVideoPlatform<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for ExternalVideoPlatform<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for ExternalVideoPlatform<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for ExternalVideoPlatform<'_> {
type Output = ExternalVideoPlatform<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ExternalVideo<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"externalVideo"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GameDetailView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub age_ratings: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::AgeRating<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub alternative_names: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::AlternativeName<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub application_type: std::option::Option<
crate::games_gamesgamesgamesgames::ApplicationType<'a>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub collections: std::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
pub created_at: jacquard_common::types::string::Datetime,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub engines: std::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub external_ids: std::option::Option<
crate::games_gamesgamesgamesgames::ExternalIds<'a>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub genres: std::option::Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub keywords: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub language_supports: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::LanguageSupport<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub modes: std::option::Option<Vec<crate::games_gamesgamesgamesgames::Mode<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub multiplayer_modes: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MultiplayerMode<'a>>,
>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub parent: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub player_perspectives: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::PlayerPerspective<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub published_at: std::option::Option<jacquard_common::types::string::Datetime>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub releases: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::Release<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub storyline: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub summary: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub themes: std::option::Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub time_to_beat: std::option::Option<
crate::games_gamesgamesgamesgames::TimeToBeat<'a>,
>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub videos: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::ExternalVideo<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub websites: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::Website<'a>>,
>,
}
pub mod game_detail_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Name;
type Uri;
type CreatedAt;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Name = Unset;
type Uri = Unset;
type CreatedAt = Unset;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Name = Set<members::name>;
type Uri = S::Uri;
type CreatedAt = S::CreatedAt;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Name = S::Name;
type Uri = Set<members::uri>;
type CreatedAt = S::CreatedAt;
}
pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
impl<S: State> State for SetCreatedAt<S> {
type Name = S::Name;
type Uri = S::Uri;
type CreatedAt = Set<members::created_at>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct name(());
pub struct uri(());
pub struct created_at(());
}
}
pub struct GameDetailViewBuilder<'a, S: game_detail_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::AgeRating<'a>>>,
::core::option::Option<
Vec<crate::games_gamesgamesgamesgames::AlternativeName<'a>>,
>,
::core::option::Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
::core::option::Option<crate::games_gamesgamesgamesgames::ExternalIds<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
::core::option::Option<
Vec<crate::games_gamesgamesgamesgames::LanguageSupport<'a>>,
>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Mode<'a>>>,
::core::option::Option<
Vec<crate::games_gamesgamesgamesgames::MultiplayerMode<'a>>,
>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<
Vec<crate::games_gamesgamesgamesgames::PlayerPerspective<'a>>,
>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
::core::option::Option<crate::games_gamesgamesgamesgames::TimeToBeat<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<
Vec<crate::games_gamesgamesgamesgames::ExternalVideo<'a>>,
>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> GameDetailView<'a> {
pub fn new() -> GameDetailViewBuilder<'a, game_detail_view_state::Empty> {
GameDetailViewBuilder::new()
}
}
impl<'a> GameDetailViewBuilder<'a, game_detail_view_state::Empty> {
pub fn new() -> Self {
GameDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (
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,
),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn age_ratings(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::AgeRating<'a>>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_age_ratings(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::AgeRating<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn alternative_names(
mut self,
value: impl Into<
Option<Vec<crate::games_gamesgamesgamesgames::AlternativeName<'a>>>,
>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_alternative_names(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::AlternativeName<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn application_type(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_application_type(
mut self,
value: Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn collections(
mut self,
value: impl Into<Option<Vec<jacquard_common::types::string::AtUri<'a>>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_collections(
mut self,
value: Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> GameDetailViewBuilder<'a, S>
where
S: game_detail_view_state::State,
S::CreatedAt: game_detail_view_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> GameDetailViewBuilder<'a, game_detail_view_state::SetCreatedAt<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
GameDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn engines(
mut self,
value: impl Into<Option<Vec<jacquard_common::types::string::AtUri<'a>>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_engines(
mut self,
value: Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn external_ids(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::ExternalIds<'a>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_external_ids(
mut self,
value: Option<crate::games_gamesgamesgamesgames::ExternalIds<'a>>,
) -> Self {
self.__unsafe_private_named.6 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn genres(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>>,
) -> Self {
self.__unsafe_private_named.7 = value.into();
self
}
pub fn maybe_genres(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
) -> Self {
self.__unsafe_private_named.7 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn keywords(
mut self,
value: impl Into<Option<Vec<jacquard_common::CowStr<'a>>>>,
) -> Self {
self.__unsafe_private_named.8 = value.into();
self
}
pub fn maybe_keywords(
mut self,
value: Option<Vec<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.8 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn language_supports(
mut self,
value: impl Into<
Option<Vec<crate::games_gamesgamesgamesgames::LanguageSupport<'a>>>,
>,
) -> Self {
self.__unsafe_private_named.9 = value.into();
self
}
pub fn maybe_language_supports(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::LanguageSupport<'a>>>,
) -> Self {
self.__unsafe_private_named.9 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn media(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.10 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
) -> Self {
self.__unsafe_private_named.10 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn modes(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Mode<'a>>>>,
) -> Self {
self.__unsafe_private_named.11 = value.into();
self
}
pub fn maybe_modes(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Mode<'a>>>,
) -> Self {
self.__unsafe_private_named.11 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn multiplayer_modes(
mut self,
value: impl Into<
Option<Vec<crate::games_gamesgamesgamesgames::MultiplayerMode<'a>>>,
>,
) -> Self {
self.__unsafe_private_named.12 = value.into();
self
}
pub fn maybe_multiplayer_modes(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::MultiplayerMode<'a>>>,
) -> Self {
self.__unsafe_private_named.12 = value;
self
}
}
impl<'a, S> GameDetailViewBuilder<'a, S>
where
S: game_detail_view_state::State,
S::Name: game_detail_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> GameDetailViewBuilder<'a, game_detail_view_state::SetName<S>> {
self.__unsafe_private_named.13 = ::core::option::Option::Some(value.into());
GameDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn parent(
mut self,
value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
) -> Self {
self.__unsafe_private_named.14 = value.into();
self
}
pub fn maybe_parent(
mut self,
value: Option<jacquard_common::types::string::AtUri<'a>>,
) -> Self {
self.__unsafe_private_named.14 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn player_perspectives(
mut self,
value: impl Into<
Option<Vec<crate::games_gamesgamesgamesgames::PlayerPerspective<'a>>>,
>,
) -> Self {
self.__unsafe_private_named.15 = value.into();
self
}
pub fn maybe_player_perspectives(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::PlayerPerspective<'a>>>,
) -> Self {
self.__unsafe_private_named.15 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn published_at(
mut self,
value: impl Into<Option<jacquard_common::types::string::Datetime>>,
) -> Self {
self.__unsafe_private_named.16 = value.into();
self
}
pub fn maybe_published_at(
mut self,
value: Option<jacquard_common::types::string::Datetime>,
) -> Self {
self.__unsafe_private_named.16 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn releases(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>>,
) -> Self {
self.__unsafe_private_named.17 = value.into();
self
}
pub fn maybe_releases(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>,
) -> Self {
self.__unsafe_private_named.17 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.18 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.18 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn storyline(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.19 = value.into();
self
}
pub fn maybe_storyline(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.19 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn summary(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.20 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.20 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn themes(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>>,
) -> Self {
self.__unsafe_private_named.21 = value.into();
self
}
pub fn maybe_themes(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
) -> Self {
self.__unsafe_private_named.21 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn time_to_beat(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::TimeToBeat<'a>>>,
) -> Self {
self.__unsafe_private_named.22 = value.into();
self
}
pub fn maybe_time_to_beat(
mut self,
value: Option<crate::games_gamesgamesgamesgames::TimeToBeat<'a>>,
) -> Self {
self.__unsafe_private_named.22 = value;
self
}
}
impl<'a, S> GameDetailViewBuilder<'a, S>
where
S: game_detail_view_state::State,
S::Uri: game_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> GameDetailViewBuilder<'a, game_detail_view_state::SetUri<S>> {
self.__unsafe_private_named.23 = ::core::option::Option::Some(value.into());
GameDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn videos(
mut self,
value: impl Into<
Option<Vec<crate::games_gamesgamesgamesgames::ExternalVideo<'a>>>,
>,
) -> Self {
self.__unsafe_private_named.24 = value.into();
self
}
pub fn maybe_videos(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::ExternalVideo<'a>>>,
) -> Self {
self.__unsafe_private_named.24 = value;
self
}
}
impl<'a, S: game_detail_view_state::State> GameDetailViewBuilder<'a, S> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>>,
) -> Self {
self.__unsafe_private_named.25 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
) -> Self {
self.__unsafe_private_named.25 = value;
self
}
}
impl<'a, S> GameDetailViewBuilder<'a, S>
where
S: game_detail_view_state::State,
S::Name: game_detail_view_state::IsSet,
S::Uri: game_detail_view_state::IsSet,
S::CreatedAt: game_detail_view_state::IsSet,
{
pub fn build(self) -> GameDetailView<'a> {
GameDetailView {
age_ratings: self.__unsafe_private_named.0,
alternative_names: self.__unsafe_private_named.1,
application_type: self.__unsafe_private_named.2,
collections: self.__unsafe_private_named.3,
created_at: self.__unsafe_private_named.4.unwrap(),
engines: self.__unsafe_private_named.5,
external_ids: self.__unsafe_private_named.6,
genres: self.__unsafe_private_named.7,
keywords: self.__unsafe_private_named.8,
language_supports: self.__unsafe_private_named.9,
media: self.__unsafe_private_named.10,
modes: self.__unsafe_private_named.11,
multiplayer_modes: self.__unsafe_private_named.12,
name: self.__unsafe_private_named.13.unwrap(),
parent: self.__unsafe_private_named.14,
player_perspectives: self.__unsafe_private_named.15,
published_at: self.__unsafe_private_named.16,
releases: self.__unsafe_private_named.17,
slug: self.__unsafe_private_named.18,
storyline: self.__unsafe_private_named.19,
summary: self.__unsafe_private_named.20,
themes: self.__unsafe_private_named.21,
time_to_beat: self.__unsafe_private_named.22,
uri: self.__unsafe_private_named.23.unwrap(),
videos: self.__unsafe_private_named.24,
websites: self.__unsafe_private_named.25,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> GameDetailView<'a> {
GameDetailView {
age_ratings: self.__unsafe_private_named.0,
alternative_names: self.__unsafe_private_named.1,
application_type: self.__unsafe_private_named.2,
collections: self.__unsafe_private_named.3,
created_at: self.__unsafe_private_named.4.unwrap(),
engines: self.__unsafe_private_named.5,
external_ids: self.__unsafe_private_named.6,
genres: self.__unsafe_private_named.7,
keywords: self.__unsafe_private_named.8,
language_supports: self.__unsafe_private_named.9,
media: self.__unsafe_private_named.10,
modes: self.__unsafe_private_named.11,
multiplayer_modes: self.__unsafe_private_named.12,
name: self.__unsafe_private_named.13.unwrap(),
parent: self.__unsafe_private_named.14,
player_perspectives: self.__unsafe_private_named.15,
published_at: self.__unsafe_private_named.16,
releases: self.__unsafe_private_named.17,
slug: self.__unsafe_private_named.18,
storyline: self.__unsafe_private_named.19,
summary: self.__unsafe_private_named.20,
themes: self.__unsafe_private_named.21,
time_to_beat: self.__unsafe_private_named.22,
uri: self.__unsafe_private_named.23.unwrap(),
videos: self.__unsafe_private_named.24,
websites: self.__unsafe_private_named.25,
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GameDetailView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameDetailView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GameFeedViewItem<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub feed_context: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub game: crate::games_gamesgamesgamesgames::GameView<'a>,
}
pub mod game_feed_view_item_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetGame<S> {}
impl<S: State> State for SetGame<S> {
type Game = Set<members::game>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct game(());
}
}
pub struct GameFeedViewItemBuilder<'a, S: game_feed_view_item_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<crate::games_gamesgamesgamesgames::GameView<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> GameFeedViewItem<'a> {
pub fn new() -> GameFeedViewItemBuilder<'a, game_feed_view_item_state::Empty> {
GameFeedViewItemBuilder::new()
}
}
impl<'a> GameFeedViewItemBuilder<'a, game_feed_view_item_state::Empty> {
pub fn new() -> Self {
GameFeedViewItemBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_feed_view_item_state::State> GameFeedViewItemBuilder<'a, S> {
pub fn feed_context(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_feed_context(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> GameFeedViewItemBuilder<'a, S>
where
S: game_feed_view_item_state::State,
S::Game: game_feed_view_item_state::IsUnset,
{
pub fn game(
mut self,
value: impl Into<crate::games_gamesgamesgamesgames::GameView<'a>>,
) -> GameFeedViewItemBuilder<'a, game_feed_view_item_state::SetGame<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
GameFeedViewItemBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> GameFeedViewItemBuilder<'a, S>
where
S: game_feed_view_item_state::State,
S::Game: game_feed_view_item_state::IsSet,
{
pub fn build(self) -> GameFeedViewItem<'a> {
GameFeedViewItem {
feed_context: self.__unsafe_private_named.0,
game: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> GameFeedViewItem<'a> {
GameFeedViewItem {
feed_context: self.__unsafe_private_named.0,
game: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GameFeedViewItem<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameFeedViewItem"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.feed_context {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"feed_context",
),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GameSummaryView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub application_type: std::option::Option<
crate::games_gamesgamesgamesgames::ApplicationType<'a>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub first_release_date: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>,
>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub summary: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod game_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Name = S::Name;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Uri = S::Uri;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct name(());
}
}
pub struct GameSummaryViewBuilder<'a, S: game_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
::core::option::Option<i64>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> GameSummaryView<'a> {
pub fn new() -> GameSummaryViewBuilder<'a, game_summary_view_state::Empty> {
GameSummaryViewBuilder::new()
}
}
impl<'a> GameSummaryViewBuilder<'a, game_summary_view_state::Empty> {
pub fn new() -> Self {
GameSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_summary_view_state::State> GameSummaryViewBuilder<'a, S> {
pub fn application_type(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_application_type(
mut self,
value: Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: game_summary_view_state::State> GameSummaryViewBuilder<'a, S> {
pub fn first_release_date(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_first_release_date(mut self, value: Option<i64>) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: game_summary_view_state::State> GameSummaryViewBuilder<'a, S> {
pub fn media(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S> GameSummaryViewBuilder<'a, S>
where
S: game_summary_view_state::State,
S::Name: game_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> GameSummaryViewBuilder<'a, game_summary_view_state::SetName<S>> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
GameSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_summary_view_state::State> GameSummaryViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.4 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.4 = value;
self
}
}
impl<'a, S: game_summary_view_state::State> GameSummaryViewBuilder<'a, S> {
pub fn summary(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<'a, S> GameSummaryViewBuilder<'a, S>
where
S: game_summary_view_state::State,
S::Uri: game_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> GameSummaryViewBuilder<'a, game_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
GameSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> GameSummaryViewBuilder<'a, S>
where
S: game_summary_view_state::State,
S::Uri: game_summary_view_state::IsSet,
S::Name: game_summary_view_state::IsSet,
{
pub fn build(self) -> GameSummaryView<'a> {
GameSummaryView {
application_type: self.__unsafe_private_named.0,
first_release_date: self.__unsafe_private_named.1,
media: self.__unsafe_private_named.2,
name: self.__unsafe_private_named.3.unwrap(),
slug: self.__unsafe_private_named.4,
summary: self.__unsafe_private_named.5,
uri: self.__unsafe_private_named.6.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> GameSummaryView<'a> {
GameSummaryView {
application_type: self.__unsafe_private_named.0,
first_release_date: self.__unsafe_private_named.1,
media: self.__unsafe_private_named.2,
name: self.__unsafe_private_named.3.unwrap(),
slug: self.__unsafe_private_named.4,
summary: self.__unsafe_private_named.5,
uri: self.__unsafe_private_named.6.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GameSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GameView<'a> {
#[serde(borrow)]
pub application_type: crate::games_gamesgamesgamesgames::ApplicationType<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub genres: std::option::Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub like_count: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>,
>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub releases: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::Release<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub summary: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub themes: std::option::Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub viewer: std::option::Option<crate::games_gamesgamesgamesgames::ViewerState<'a>>,
}
pub mod game_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Name;
type ApplicationType;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Name = Unset;
type ApplicationType = Unset;
type Uri = Unset;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Name = Set<members::name>;
type ApplicationType = S::ApplicationType;
type Uri = S::Uri;
}
pub struct SetApplicationType<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetApplicationType<S> {}
impl<S: State> State for SetApplicationType<S> {
type Name = S::Name;
type ApplicationType = Set<members::application_type>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Name = S::Name;
type ApplicationType = S::ApplicationType;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct name(());
pub struct application_type(());
pub struct uri(());
}
}
pub struct GameViewBuilder<'a, S: game_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
::core::option::Option<i64>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<crate::games_gamesgamesgamesgames::ViewerState<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> GameView<'a> {
pub fn new() -> GameViewBuilder<'a, game_view_state::Empty> {
GameViewBuilder::new()
}
}
impl<'a> GameViewBuilder<'a, game_view_state::Empty> {
pub fn new() -> Self {
GameViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> GameViewBuilder<'a, S>
where
S: game_view_state::State,
S::ApplicationType: game_view_state::IsUnset,
{
pub fn application_type(
mut self,
value: impl Into<crate::games_gamesgamesgamesgames::ApplicationType<'a>>,
) -> GameViewBuilder<'a, game_view_state::SetApplicationType<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
GameViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn genres(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_genres(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Genre<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn media(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> GameViewBuilder<'a, S>
where
S: game_view_state::State,
S::Name: game_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> GameViewBuilder<'a, game_view_state::SetName<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
GameViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn releases(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_releases(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Release<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.6 = value;
self
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn summary(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.7 = value.into();
self
}
pub fn maybe_summary(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.7 = value;
self
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn themes(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>>,
) -> Self {
self.__unsafe_private_named.8 = value.into();
self
}
pub fn maybe_themes(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Theme<'a>>>,
) -> Self {
self.__unsafe_private_named.8 = value;
self
}
}
impl<'a, S> GameViewBuilder<'a, S>
where
S: game_view_state::State,
S::Uri: game_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> GameViewBuilder<'a, game_view_state::SetUri<S>> {
self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
GameViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: game_view_state::State> GameViewBuilder<'a, S> {
pub fn viewer(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::ViewerState<'a>>>,
) -> Self {
self.__unsafe_private_named.10 = value.into();
self
}
pub fn maybe_viewer(
mut self,
value: Option<crate::games_gamesgamesgamesgames::ViewerState<'a>>,
) -> Self {
self.__unsafe_private_named.10 = value;
self
}
}
impl<'a, S> GameViewBuilder<'a, S>
where
S: game_view_state::State,
S::Name: game_view_state::IsSet,
S::ApplicationType: game_view_state::IsSet,
S::Uri: game_view_state::IsSet,
{
pub fn build(self) -> GameView<'a> {
GameView {
application_type: self.__unsafe_private_named.0.unwrap(),
genres: self.__unsafe_private_named.1,
like_count: self.__unsafe_private_named.2,
media: self.__unsafe_private_named.3,
name: self.__unsafe_private_named.4.unwrap(),
releases: self.__unsafe_private_named.5,
slug: self.__unsafe_private_named.6,
summary: self.__unsafe_private_named.7,
themes: self.__unsafe_private_named.8,
uri: self.__unsafe_private_named.9.unwrap(),
viewer: self.__unsafe_private_named.10,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> GameView<'a> {
GameView {
application_type: self.__unsafe_private_named.0.unwrap(),
genres: self.__unsafe_private_named.1,
like_count: self.__unsafe_private_named.2,
media: self.__unsafe_private_named.3,
name: self.__unsafe_private_named.4.unwrap(),
releases: self.__unsafe_private_named.5,
slug: self.__unsafe_private_named.6,
summary: self.__unsafe_private_named.7,
themes: self.__unsafe_private_named.8,
uri: self.__unsafe_private_named.9.unwrap(),
viewer: self.__unsafe_private_named.10,
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GameView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"gameView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.like_count {
if *value < 0i64 {
return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"like_count",
),
min: 0i64,
actual: *value,
});
}
}
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Genre<'a> {
Fighting,
Music,
Platform,
PointAndClick,
Puzzle,
Racing,
Rpg,
Rts,
Shooter,
Simulator,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> Genre<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for Genre<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for Genre<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for Genre<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for Genre<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for Genre<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for Genre<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for Genre<'_> {
type Output = Genre<'static>;
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<'a> {
Director,
Producer,
Designer,
Programmer,
Artist,
Animator,
Writer,
Composer,
SoundDesigner,
VoiceActor,
Qa,
Localization,
CommunityManager,
Marketing,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> IndividualRole<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for IndividualRole<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for IndividualRole<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for IndividualRole<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for IndividualRole<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for IndividualRole<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for IndividualRole<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for IndividualRole<'_> {
type Output = IndividualRole<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct ItchIoId<'a> {
#[serde(borrow)]
pub developer: jacquard_common::CowStr<'a>,
#[serde(borrow)]
pub game: jacquard_common::CowStr<'a>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ItchIoId<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"itchIoId"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct LanguageSupport<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub audio: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub interface: std::option::Option<bool>,
#[serde(borrow)]
pub language: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub subtitles: std::option::Option<bool>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LanguageSupport<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"languageSupport"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct MediaItem<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub blob: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub height: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub locale: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media_type: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub title: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub width: std::option::Option<i64>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MediaItem<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"mediaItem"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.blob {
{
let size = value.blob().size;
if size > 200000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"blob",
),
accepted: vec!["image/*".to_string(), "video/*".to_string()],
actual: mime.to_string(),
});
}
}
}
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Mode<'a> {
BattleRoyale,
Cooperative,
Mmo,
Multiplayer,
SinglePlayer,
SplitScreen,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> Mode<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for Mode<'a> {
fn from(s: &'a str) -> Self {
match s {
"battleRoyale" => Self::BattleRoyale,
"cooperative" => Self::Cooperative,
"mmo" => Self::Mmo,
"multiplayer" => Self::Multiplayer,
"singlePlayer" => Self::SinglePlayer,
"splitScreen" => Self::SplitScreen,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for Mode<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"battleRoyale" => Self::BattleRoyale,
"cooperative" => Self::Cooperative,
"mmo" => Self::Mmo,
"multiplayer" => Self::Multiplayer,
"singlePlayer" => Self::SinglePlayer,
"splitScreen" => Self::SplitScreen,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for Mode<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for Mode<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for Mode<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for Mode<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for Mode<'_> {
type Output = Mode<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct MultiplayerMode<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub has_campaign_coop: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub has_drop_in: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub has_lan_coop: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub has_splitscreen: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub has_splitscreen_online: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub offline_coop_max: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub offline_max: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub online_coop_max: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub online_max: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub platform: std::option::Option<jacquard_common::CowStr<'a>>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MultiplayerMode<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"multiplayerMode"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct OrgProfileDetailView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub country: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description_facets: std::option::Option<
Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
>,
#[serde(borrow)]
pub did: jacquard_common::types::string::Did<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub founded_at: std::option::Option<jacquard_common::types::string::Datetime>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub parent: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub status: std::option::Option<OrgProfileDetailViewStatus<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub websites: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::Website<'a>>,
>,
}
pub mod org_profile_detail_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Did = S::Did;
}
pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Uri = S::Uri;
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct did(());
}
}
pub struct OrgProfileDetailViewBuilder<'a, S: org_profile_detail_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<OrgProfileDetailViewStatus<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> OrgProfileDetailView<'a> {
pub fn new() -> OrgProfileDetailViewBuilder<
'a,
org_profile_detail_view_state::Empty,
> {
OrgProfileDetailViewBuilder::new()
}
}
impl<'a> OrgProfileDetailViewBuilder<'a, org_profile_detail_view_state::Empty> {
pub fn new() -> Self {
OrgProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::blob::BlobRef<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn country(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_country(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn created_at(
mut self,
value: impl Into<Option<jacquard_common::types::string::Datetime>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_created_at(
mut self,
value: Option<jacquard_common::types::string::Datetime>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn description(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_description(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn description_facets(
mut self,
value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>,
) -> Self {
self.__unsafe_private_named.4 = value.into();
self
}
pub fn maybe_description_facets(
mut self,
value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
) -> Self {
self.__unsafe_private_named.4 = value;
self
}
}
impl<'a, S> OrgProfileDetailViewBuilder<'a, S>
where
S: org_profile_detail_view_state::State,
S::Did: org_profile_detail_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> OrgProfileDetailViewBuilder<'a, org_profile_detail_view_state::SetDid<S>> {
self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
OrgProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn display_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_display_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.6 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn founded_at(
mut self,
value: impl Into<Option<jacquard_common::types::string::Datetime>>,
) -> Self {
self.__unsafe_private_named.7 = value.into();
self
}
pub fn maybe_founded_at(
mut self,
value: Option<jacquard_common::types::string::Datetime>,
) -> Self {
self.__unsafe_private_named.7 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn media(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.8 = value.into();
self
}
pub fn maybe_media(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>>,
) -> Self {
self.__unsafe_private_named.8 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn parent(
mut self,
value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
) -> Self {
self.__unsafe_private_named.9 = value.into();
self
}
pub fn maybe_parent(
mut self,
value: Option<jacquard_common::types::string::AtUri<'a>>,
) -> Self {
self.__unsafe_private_named.9 = value;
self
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn status(
mut self,
value: impl Into<Option<OrgProfileDetailViewStatus<'a>>>,
) -> Self {
self.__unsafe_private_named.10 = value.into();
self
}
pub fn maybe_status(
mut self,
value: Option<OrgProfileDetailViewStatus<'a>>,
) -> Self {
self.__unsafe_private_named.10 = value;
self
}
}
impl<'a, S> OrgProfileDetailViewBuilder<'a, S>
where
S: org_profile_detail_view_state::State,
S::Uri: org_profile_detail_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> OrgProfileDetailViewBuilder<'a, org_profile_detail_view_state::SetUri<S>> {
self.__unsafe_private_named.11 = ::core::option::Option::Some(value.into());
OrgProfileDetailViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: org_profile_detail_view_state::State> OrgProfileDetailViewBuilder<'a, S> {
pub fn websites(
mut self,
value: impl Into<Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>>,
) -> Self {
self.__unsafe_private_named.12 = value.into();
self
}
pub fn maybe_websites(
mut self,
value: Option<Vec<crate::games_gamesgamesgamesgames::Website<'a>>>,
) -> Self {
self.__unsafe_private_named.12 = value;
self
}
}
impl<'a, S> OrgProfileDetailViewBuilder<'a, S>
where
S: org_profile_detail_view_state::State,
S::Uri: org_profile_detail_view_state::IsSet,
S::Did: org_profile_detail_view_state::IsSet,
{
pub fn build(self) -> OrgProfileDetailView<'a> {
OrgProfileDetailView {
avatar: self.__unsafe_private_named.0,
country: self.__unsafe_private_named.1,
created_at: self.__unsafe_private_named.2,
description: self.__unsafe_private_named.3,
description_facets: self.__unsafe_private_named.4,
did: self.__unsafe_private_named.5.unwrap(),
display_name: self.__unsafe_private_named.6,
founded_at: self.__unsafe_private_named.7,
media: self.__unsafe_private_named.8,
parent: self.__unsafe_private_named.9,
status: self.__unsafe_private_named.10,
uri: self.__unsafe_private_named.11.unwrap(),
websites: self.__unsafe_private_named.12,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> OrgProfileDetailView<'a> {
OrgProfileDetailView {
avatar: self.__unsafe_private_named.0,
country: self.__unsafe_private_named.1,
created_at: self.__unsafe_private_named.2,
description: self.__unsafe_private_named.3,
description_facets: self.__unsafe_private_named.4,
did: self.__unsafe_private_named.5.unwrap(),
display_name: self.__unsafe_private_named.6,
founded_at: self.__unsafe_private_named.7,
media: self.__unsafe_private_named.8,
parent: self.__unsafe_private_named.9,
status: self.__unsafe_private_named.10,
uri: self.__unsafe_private_named.11.unwrap(),
websites: self.__unsafe_private_named.12,
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum OrgProfileDetailViewStatus<'a> {
Active,
Inactive,
Merged,
Acquired,
Defunct,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> OrgProfileDetailViewStatus<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for OrgProfileDetailViewStatus<'a> {
fn from(s: &'a str) -> Self {
match s {
"active" => Self::Active,
"inactive" => Self::Inactive,
"merged" => Self::Merged,
"acquired" => Self::Acquired,
"defunct" => Self::Defunct,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for OrgProfileDetailViewStatus<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"active" => Self::Active,
"inactive" => Self::Inactive,
"merged" => Self::Merged,
"acquired" => Self::Acquired,
"defunct" => Self::Defunct,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for OrgProfileDetailViewStatus<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for OrgProfileDetailViewStatus<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for OrgProfileDetailViewStatus<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for OrgProfileDetailViewStatus<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for OrgProfileDetailViewStatus<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for OrgProfileDetailViewStatus<'_> {
type Output = OrgProfileDetailViewStatus<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for OrgProfileDetailView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"orgProfileDetailView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"display_name",
),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct OrgProfileSummaryView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(borrow)]
pub did: jacquard_common::types::string::Did<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod org_profile_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Did = Set<members::did>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Did = S::Did;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
pub struct uri(());
}
}
pub struct OrgProfileSummaryViewBuilder<'a, S: org_profile_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> OrgProfileSummaryView<'a> {
pub fn new() -> OrgProfileSummaryViewBuilder<
'a,
org_profile_summary_view_state::Empty,
> {
OrgProfileSummaryViewBuilder::new()
}
}
impl<'a> OrgProfileSummaryViewBuilder<'a, org_profile_summary_view_state::Empty> {
pub fn new() -> Self {
OrgProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: org_profile_summary_view_state::State> OrgProfileSummaryViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::blob::BlobRef<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> OrgProfileSummaryViewBuilder<'a, S>
where
S: org_profile_summary_view_state::State,
S::Did: org_profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> OrgProfileSummaryViewBuilder<'a, org_profile_summary_view_state::SetDid<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
OrgProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: org_profile_summary_view_state::State> OrgProfileSummaryViewBuilder<'a, S> {
pub fn display_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_display_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S> OrgProfileSummaryViewBuilder<'a, S>
where
S: org_profile_summary_view_state::State,
S::Uri: org_profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> OrgProfileSummaryViewBuilder<'a, org_profile_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
OrgProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> OrgProfileSummaryViewBuilder<'a, S>
where
S: org_profile_summary_view_state::State,
S::Did: org_profile_summary_view_state::IsSet,
S::Uri: org_profile_summary_view_state::IsSet,
{
pub fn build(self) -> OrgProfileSummaryView<'a> {
OrgProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> OrgProfileSummaryView<'a> {
OrgProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
uri: self.__unsafe_private_named.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for OrgProfileSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"orgProfileSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"display_name",
),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlatformCategory<'a> {
Console,
Portable,
Computer,
Arcade,
OperatingSystem,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> PlatformCategory<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for PlatformCategory<'a> {
fn from(s: &'a str) -> Self {
match s {
"console" => Self::Console,
"portable" => Self::Portable,
"computer" => Self::Computer,
"arcade" => Self::Arcade,
"operatingSystem" => Self::OperatingSystem,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for PlatformCategory<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"console" => Self::Console,
"portable" => Self::Portable,
"computer" => Self::Computer,
"arcade" => Self::Arcade,
"operatingSystem" => Self::OperatingSystem,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for PlatformCategory<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for PlatformCategory<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for PlatformCategory<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for PlatformCategory<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for PlatformCategory<'_> {
type Output = PlatformCategory<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct PlatformFeatures<'a> {
#[serde(borrow)]
pub features: Vec<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub platform: PlatformFeaturesPlatform<'a>,
}
pub mod platform_features_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetFeatures<S> {}
impl<S: State> State for SetFeatures<S> {
type Features = Set<members::features>;
type Platform = S::Platform;
}
pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPlatform<S> {}
impl<S: State> State for SetPlatform<S> {
type Features = S::Features;
type Platform = Set<members::platform>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct features(());
pub struct platform(());
}
}
pub struct PlatformFeaturesBuilder<'a, S: platform_features_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
::core::option::Option<PlatformFeaturesPlatform<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> PlatformFeatures<'a> {
pub fn new() -> PlatformFeaturesBuilder<'a, platform_features_state::Empty> {
PlatformFeaturesBuilder::new()
}
}
impl<'a> PlatformFeaturesBuilder<'a, platform_features_state::Empty> {
pub fn new() -> Self {
PlatformFeaturesBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> PlatformFeaturesBuilder<'a, S>
where
S: platform_features_state::State,
S::Features: platform_features_state::IsUnset,
{
pub fn features(
mut self,
value: impl Into<Vec<jacquard_common::CowStr<'a>>>,
) -> PlatformFeaturesBuilder<'a, platform_features_state::SetFeatures<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
PlatformFeaturesBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> PlatformFeaturesBuilder<'a, S>
where
S: platform_features_state::State,
S::Platform: platform_features_state::IsUnset,
{
pub fn platform(
mut self,
value: impl Into<PlatformFeaturesPlatform<'a>>,
) -> PlatformFeaturesBuilder<'a, platform_features_state::SetPlatform<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
PlatformFeaturesBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> PlatformFeaturesBuilder<'a, S>
where
S: platform_features_state::State,
S::Features: platform_features_state::IsSet,
S::Platform: platform_features_state::IsSet,
{
pub fn build(self) -> PlatformFeatures<'a> {
PlatformFeatures {
features: self.__unsafe_private_named.0.unwrap(),
platform: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> PlatformFeatures<'a> {
PlatformFeatures {
features: self.__unsafe_private_named.0.unwrap(),
platform: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlatformFeaturesPlatform<'a> {
Steam,
Gog,
EpicGames,
PlayStation,
Xbox,
NintendoEshop,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> PlatformFeaturesPlatform<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for PlatformFeaturesPlatform<'a> {
fn from(s: &'a str) -> Self {
match s {
"steam" => Self::Steam,
"gog" => Self::Gog,
"epicGames" => Self::EpicGames,
"playStation" => Self::PlayStation,
"xbox" => Self::Xbox,
"nintendoEshop" => Self::NintendoEshop,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for PlatformFeaturesPlatform<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"steam" => Self::Steam,
"gog" => Self::Gog,
"epicGames" => Self::EpicGames,
"playStation" => Self::PlayStation,
"xbox" => Self::Xbox,
"nintendoEshop" => Self::NintendoEshop,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for PlatformFeaturesPlatform<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for PlatformFeaturesPlatform<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for PlatformFeaturesPlatform<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for PlatformFeaturesPlatform<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for PlatformFeaturesPlatform<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for PlatformFeaturesPlatform<'_> {
type Output = PlatformFeaturesPlatform<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PlatformFeatures<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformFeatures"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct PlatformSummaryView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub abbreviation: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub category: std::option::Option<
crate::games_gamesgamesgamesgames::PlatformCategory<'a>,
>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub slug: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod platform_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type Name = Set<members::name>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Name = S::Name;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct name(());
pub struct uri(());
}
}
pub struct PlatformSummaryViewBuilder<'a, S: platform_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<crate::games_gamesgamesgamesgames::PlatformCategory<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> PlatformSummaryView<'a> {
pub fn new() -> PlatformSummaryViewBuilder<'a, platform_summary_view_state::Empty> {
PlatformSummaryViewBuilder::new()
}
}
impl<'a> PlatformSummaryViewBuilder<'a, platform_summary_view_state::Empty> {
pub fn new() -> Self {
PlatformSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: platform_summary_view_state::State> PlatformSummaryViewBuilder<'a, S> {
pub fn abbreviation(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_abbreviation(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: platform_summary_view_state::State> PlatformSummaryViewBuilder<'a, S> {
pub fn category(
mut self,
value: impl Into<Option<crate::games_gamesgamesgamesgames::PlatformCategory<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_category(
mut self,
value: Option<crate::games_gamesgamesgamesgames::PlatformCategory<'a>>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S> PlatformSummaryViewBuilder<'a, S>
where
S: platform_summary_view_state::State,
S::Name: platform_summary_view_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> PlatformSummaryViewBuilder<'a, platform_summary_view_state::SetName<S>> {
self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
PlatformSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: platform_summary_view_state::State> PlatformSummaryViewBuilder<'a, S> {
pub fn slug(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_slug(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> PlatformSummaryViewBuilder<'a, S>
where
S: platform_summary_view_state::State,
S::Uri: platform_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> PlatformSummaryViewBuilder<'a, platform_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
PlatformSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> PlatformSummaryViewBuilder<'a, S>
where
S: platform_summary_view_state::State,
S::Name: platform_summary_view_state::IsSet,
S::Uri: platform_summary_view_state::IsSet,
{
pub fn build(self) -> PlatformSummaryView<'a> {
PlatformSummaryView {
abbreviation: self.__unsafe_private_named.0,
category: self.__unsafe_private_named.1,
name: self.__unsafe_private_named.2.unwrap(),
slug: self.__unsafe_private_named.3,
uri: self.__unsafe_private_named.4.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> PlatformSummaryView<'a> {
PlatformSummaryView {
abbreviation: self.__unsafe_private_named.0,
category: self.__unsafe_private_named.1,
name: self.__unsafe_private_named.2.unwrap(),
slug: self.__unsafe_private_named.3,
uri: self.__unsafe_private_named.4.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PlatformSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct PlatformVersion<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub connectivity: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub cpu: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub gpu: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub max_resolution: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub media: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::MediaItem<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub memory: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub name: jacquard_common::CowStr<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub os: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub output: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub storage: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub summary: std::option::Option<jacquard_common::CowStr<'a>>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PlatformVersion<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"platformVersion"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PlayerPerspective<'a> {
Auditory,
FirstPerson,
Isometric,
SideView,
Text,
ThirdPerson,
TopDown,
Vr,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> PlayerPerspective<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for PlayerPerspective<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for PlayerPerspective<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for PlayerPerspective<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for PlayerPerspective<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for PlayerPerspective<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for PlayerPerspective<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for PlayerPerspective<'_> {
type Output = PlayerPerspective<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct ProfileSummaryView<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
#[serde(borrow)]
pub did: jacquard_common::types::string::Did<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub profile_type: ProfileSummaryViewProfileType<'a>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
}
pub mod profile_summary_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Did;
type Uri;
type ProfileType;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Did = Unset;
type Uri = Unset;
type ProfileType = Unset;
}
pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Did = Set<members::did>;
type Uri = S::Uri;
type ProfileType = S::ProfileType;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Did = S::Did;
type Uri = Set<members::uri>;
type ProfileType = S::ProfileType;
}
pub struct SetProfileType<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetProfileType<S> {}
impl<S: State> State for SetProfileType<S> {
type Did = S::Did;
type Uri = S::Uri;
type ProfileType = Set<members::profile_type>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
pub struct uri(());
pub struct profile_type(());
}
}
pub struct ProfileSummaryViewBuilder<'a, S: profile_summary_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<ProfileSummaryViewProfileType<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ProfileSummaryView<'a> {
pub fn new() -> ProfileSummaryViewBuilder<'a, profile_summary_view_state::Empty> {
ProfileSummaryViewBuilder::new()
}
}
impl<'a> ProfileSummaryViewBuilder<'a, profile_summary_view_state::Empty> {
pub fn new() -> Self {
ProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: profile_summary_view_state::State> ProfileSummaryViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::blob::BlobRef<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> ProfileSummaryViewBuilder<'a, S>
where
S: profile_summary_view_state::State,
S::Did: profile_summary_view_state::IsUnset,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> ProfileSummaryViewBuilder<'a, profile_summary_view_state::SetDid<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
ProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: profile_summary_view_state::State> ProfileSummaryViewBuilder<'a, S> {
pub fn display_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_display_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S> ProfileSummaryViewBuilder<'a, S>
where
S: profile_summary_view_state::State,
S::ProfileType: profile_summary_view_state::IsUnset,
{
pub fn profile_type(
mut self,
value: impl Into<ProfileSummaryViewProfileType<'a>>,
) -> ProfileSummaryViewBuilder<'a, profile_summary_view_state::SetProfileType<S>> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
ProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> ProfileSummaryViewBuilder<'a, S>
where
S: profile_summary_view_state::State,
S::Uri: profile_summary_view_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> ProfileSummaryViewBuilder<'a, profile_summary_view_state::SetUri<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
ProfileSummaryViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> ProfileSummaryViewBuilder<'a, S>
where
S: profile_summary_view_state::State,
S::Did: profile_summary_view_state::IsSet,
S::Uri: profile_summary_view_state::IsSet,
S::ProfileType: profile_summary_view_state::IsSet,
{
pub fn build(self) -> ProfileSummaryView<'a> {
ProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
profile_type: self.__unsafe_private_named.3.unwrap(),
uri: self.__unsafe_private_named.4.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> ProfileSummaryView<'a> {
ProfileSummaryView {
avatar: self.__unsafe_private_named.0,
did: self.__unsafe_private_named.1.unwrap(),
display_name: self.__unsafe_private_named.2,
profile_type: self.__unsafe_private_named.3.unwrap(),
uri: self.__unsafe_private_named.4.unwrap(),
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ProfileSummaryViewProfileType<'a> {
Actor,
Org,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> ProfileSummaryViewProfileType<'a> {
pub fn as_str(&self) -> &str {
match self {
Self::Actor => "actor",
Self::Org => "org",
Self::Other(s) => s.as_ref(),
}
}
}
impl<'a> From<&'a str> for ProfileSummaryViewProfileType<'a> {
fn from(s: &'a str) -> Self {
match s {
"actor" => Self::Actor,
"org" => Self::Org,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for ProfileSummaryViewProfileType<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"actor" => Self::Actor,
"org" => Self::Org,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for ProfileSummaryViewProfileType<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for ProfileSummaryViewProfileType<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for ProfileSummaryViewProfileType<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for ProfileSummaryViewProfileType<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for ProfileSummaryViewProfileType<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for ProfileSummaryViewProfileType<'_> {
type Output = ProfileSummaryViewProfileType<'static>;
fn into_static(self) -> Self::Output {
match self {
ProfileSummaryViewProfileType::Actor => ProfileSummaryViewProfileType::Actor,
ProfileSummaryViewProfileType::Org => ProfileSummaryViewProfileType::Org,
ProfileSummaryViewProfileType::Other(v) => {
ProfileSummaryViewProfileType::Other(v.into_static())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileSummaryView<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"profileSummaryView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.avatar {
{
let size = value.blob().size;
if size > 10000000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::BlobTooLarge {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::BlobMimeTypeNotAccepted {
path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"display_name",
),
max: 640usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct Release<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub platform: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub platform_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub release_dates: std::option::Option<
Vec<crate::games_gamesgamesgamesgames::ReleaseDate<'a>>,
>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Release<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"release"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct ReleaseDate<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub region: std::option::Option<ReleaseDateRegion<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub released_at: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub released_at_format: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub status: std::option::Option<ReleaseDateStatus<'a>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ReleaseDateRegion<'a> {
Worldwide,
Europe,
NorthAmerica,
Australia,
NewZealand,
Japan,
China,
Asia,
Korea,
Brazil,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> ReleaseDateRegion<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for ReleaseDateRegion<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for ReleaseDateRegion<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for ReleaseDateRegion<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for ReleaseDateRegion<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for ReleaseDateRegion<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for ReleaseDateRegion<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for ReleaseDateRegion<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for ReleaseDateRegion<'_> {
type Output = ReleaseDateRegion<'static>;
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<'a> {
AdvancedAccess,
Alpha,
Beta,
Cancelled,
DigitalCompatibilityRelease,
EarlyAccess,
NextGenOptimizationRelease,
Offline,
Release,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> ReleaseDateStatus<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for ReleaseDateStatus<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for ReleaseDateStatus<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for ReleaseDateStatus<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for ReleaseDateStatus<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for ReleaseDateStatus<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for ReleaseDateStatus<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for ReleaseDateStatus<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for ReleaseDateStatus<'_> {
type Output = ReleaseDateStatus<'static>;
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()),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReleaseDate<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"releaseDate"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct SkeletonGameFeedItem<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub feed_context: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub game: jacquard_common::types::string::AtUri<'a>,
}
pub mod skeleton_game_feed_item_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetGame<S> {}
impl<S: State> State for SetGame<S> {
type Game = Set<members::game>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct game(());
}
}
pub struct SkeletonGameFeedItemBuilder<'a, S: skeleton_game_feed_item_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> SkeletonGameFeedItem<'a> {
pub fn new() -> SkeletonGameFeedItemBuilder<
'a,
skeleton_game_feed_item_state::Empty,
> {
SkeletonGameFeedItemBuilder::new()
}
}
impl<'a> SkeletonGameFeedItemBuilder<'a, skeleton_game_feed_item_state::Empty> {
pub fn new() -> Self {
SkeletonGameFeedItemBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: skeleton_game_feed_item_state::State> SkeletonGameFeedItemBuilder<'a, S> {
pub fn feed_context(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_feed_context(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> SkeletonGameFeedItemBuilder<'a, S>
where
S: skeleton_game_feed_item_state::State,
S::Game: skeleton_game_feed_item_state::IsUnset,
{
pub fn game(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> SkeletonGameFeedItemBuilder<'a, skeleton_game_feed_item_state::SetGame<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
SkeletonGameFeedItemBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> SkeletonGameFeedItemBuilder<'a, S>
where
S: skeleton_game_feed_item_state::State,
S::Game: skeleton_game_feed_item_state::IsSet,
{
pub fn build(self) -> SkeletonGameFeedItem<'a> {
SkeletonGameFeedItem {
feed_context: self.__unsafe_private_named.0,
game: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> SkeletonGameFeedItem<'a> {
SkeletonGameFeedItem {
feed_context: self.__unsafe_private_named.0,
game: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonGameFeedItem<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"skeletonGameFeedItem"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.feed_context {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"feed_context",
),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct SystemRequirements<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub minimum: std::option::Option<crate::games_gamesgamesgamesgames::SystemSpec<'a>>,
#[serde(borrow)]
pub platform: SystemRequirementsPlatform<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub recommended: std::option::Option<
crate::games_gamesgamesgamesgames::SystemSpec<'a>,
>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum SystemRequirementsPlatform<'a> {
Windows,
Mac,
Linux,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> SystemRequirementsPlatform<'a> {
pub fn as_str(&self) -> &str {
match self {
Self::Windows => "windows",
Self::Mac => "mac",
Self::Linux => "linux",
Self::Other(s) => s.as_ref(),
}
}
}
impl<'a> From<&'a str> for SystemRequirementsPlatform<'a> {
fn from(s: &'a str) -> Self {
match s {
"windows" => Self::Windows,
"mac" => Self::Mac,
"linux" => Self::Linux,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for SystemRequirementsPlatform<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"windows" => Self::Windows,
"mac" => Self::Mac,
"linux" => Self::Linux,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for SystemRequirementsPlatform<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for SystemRequirementsPlatform<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for SystemRequirementsPlatform<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for SystemRequirementsPlatform<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for SystemRequirementsPlatform<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for SystemRequirementsPlatform<'_> {
type Output = SystemRequirementsPlatform<'static>;
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())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SystemRequirements<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"systemRequirements"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct SystemSpec<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub additional_notes: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub directx: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub graphics: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub memory: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub os: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub processor: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub sound_card: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub storage: std::option::Option<jacquard_common::CowStr<'a>>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SystemSpec<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"systemSpec"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Theme<'a> {
_4x,
Action,
Business,
Comedy,
Drama,
Educational,
Erotic,
Fantasy,
Historical,
Horror,
Kids,
Mystery,
Nonfiction,
OpenWorld,
Party,
Romance,
Sandbox,
Scifi,
Stealth,
Survival,
Thriller,
Warfare,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> Theme<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for Theme<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for Theme<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> AsRef<str> for Theme<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> core::fmt::Display for Theme<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> serde::Serialize for Theme<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for Theme<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl jacquard_common::IntoStatic for Theme<'_> {
type Output = Theme<'static>;
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()),
}
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct TimeToBeat<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub completely: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub hastily: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub normally: std::option::Option<i64>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for TimeToBeat<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"timeToBeat"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct ViewerState<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub like: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewerState<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"viewerState"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct Website<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub r#type: std::option::Option<WebsiteType<'a>>,
#[serde(borrow)]
pub url: jacquard_common::types::string::UriValue<'a>,
}
pub mod website_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[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<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUrl<S> {}
impl<S: State> State for SetUrl<S> {
type Url = Set<members::url>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct url(());
}
}
pub struct WebsiteBuilder<'a, S: website_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<WebsiteType<'a>>,
::core::option::Option<jacquard_common::types::string::UriValue<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> Website<'a> {
pub fn new() -> WebsiteBuilder<'a, website_state::Empty> {
WebsiteBuilder::new()
}
}
impl<'a> WebsiteBuilder<'a, website_state::Empty> {
pub fn new() -> Self {
WebsiteBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: website_state::State> WebsiteBuilder<'a, S> {
pub fn r#type(mut self, value: impl Into<Option<WebsiteType<'a>>>) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_type(mut self, value: Option<WebsiteType<'a>>) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> WebsiteBuilder<'a, S>
where
S: website_state::State,
S::Url: website_state::IsUnset,
{
pub fn url(
mut self,
value: impl Into<jacquard_common::types::string::UriValue<'a>>,
) -> WebsiteBuilder<'a, website_state::SetUrl<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
WebsiteBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> WebsiteBuilder<'a, S>
where
S: website_state::State,
S::Url: website_state::IsSet,
{
pub fn build(self) -> Website<'a> {
Website {
r#type: self.__unsafe_private_named.0,
url: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> Website<'a> {
Website {
r#type: self.__unsafe_private_named.0,
url: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum WebsiteType<'a> {
Official,
Wiki,
Steam,
Gog,
EpicGames,
ItchIo,
Twitter,
Instagram,
Youtube,
Twitch,
Discord,
Reddit,
Facebook,
Wikipedia,
Bluesky,
Xbox,
Playstation,
Nintendo,
Meta,
Other,
UnknownValue(jacquard_common::CowStr<'a>),
}
impl<'a> WebsiteType<'a> {
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(),
}
}
}
impl<'a> From<&'a str> for WebsiteType<'a> {
fn from(s: &'a str) -> Self {
match s {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for WebsiteType<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"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(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for WebsiteType<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for WebsiteType<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for WebsiteType<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for WebsiteType<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for WebsiteType<'a> {
fn default() -> Self {
Self::UnknownValue(Default::default())
}
}
impl jacquard_common::IntoStatic for WebsiteType<'_> {
type Output = WebsiteType<'static>;
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<'a> ::jacquard_lexicon::schema::LexiconSchema for Website<'a> {
fn nsid() -> &'static str {
"games.gamesgamesgamesgames.defs"
}
fn def_name() -> &'static str {
"website"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_games_gamesgamesgamesgames_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}