jacquard-api 0.11.0

Generated AT Protocol API bindings for Jacquard
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: games.gamesgamesgamesgames.putGame
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;
use jacquard_common::types::string::{AtUri, Datetime};
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::games_gamesgamesgamesgames::AgeRating;
use crate::games_gamesgamesgamesgames::AlternativeName;
use crate::games_gamesgamesgamesgames::ApplicationType;
use crate::games_gamesgamesgamesgames::ExternalVideo;
use crate::games_gamesgamesgamesgames::Genre;
use crate::games_gamesgamesgamesgames::LanguageSupport;
use crate::games_gamesgamesgamesgames::MediaItem;
use crate::games_gamesgamesgamesgames::Mode;
use crate::games_gamesgamesgamesgames::MultiplayerMode;
use crate::games_gamesgamesgamesgames::PlayerPerspective;
use crate::games_gamesgamesgamesgames::Release;
use crate::games_gamesgamesgamesgames::Theme;
use crate::games_gamesgamesgamesgames::TimeToBeat;
use crate::games_gamesgamesgamesgames::Website;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct PutGame<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub age_ratings: Option<Vec<AgeRating<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub alternative_names: Option<Vec<AlternativeName<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub application_type: Option<ApplicationType<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub created_at: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub engines: Option<Vec<AtUri<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub genres: Option<Vec<Genre<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub keywords: Option<Vec<CowStr<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub language_supports: Option<Vec<LanguageSupport<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub media: Option<Vec<MediaItem<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub modes: Option<Vec<Mode<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub multiplayer_modes: Option<Vec<MultiplayerMode<'a>>>,
    #[serde(borrow)]
    pub name: CowStr<'a>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub parent: Option<AtUri<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub player_perspectives: Option<Vec<PlayerPerspective<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub releases: Option<Vec<Release<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub should_publish: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub storyline: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub summary: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub themes: Option<Vec<Theme<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub time_to_beat: Option<TimeToBeat<'a>>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub videos: Option<Vec<ExternalVideo<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub websites: Option<Vec<Website<'a>>>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct PutGameOutput<'a> {
    #[serde(borrow)]
    pub cid: CowStr<'a>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
}

/// Response type for games.gamesgamesgamesgames.putGame
pub struct PutGameResponse;
impl jacquard_common::xrpc::XrpcResp for PutGameResponse {
    const NSID: &'static str = "games.gamesgamesgamesgames.putGame";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = PutGameOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for PutGame<'a> {
    const NSID: &'static str = "games.gamesgamesgamesgames.putGame";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = PutGameResponse;
}

/// Endpoint type for games.gamesgamesgamesgames.putGame
pub struct PutGameRequest;
impl jacquard_common::xrpc::XrpcEndpoint for PutGameRequest {
    const PATH: &'static str = "/xrpc/games.gamesgamesgamesgames.putGame";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = PutGame<'de>;
    type Response = PutGameResponse;
}

pub mod put_game_state {

    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
    #[allow(unused)]
    use ::core::marker::PhantomData;
    mod sealed {
        pub trait Sealed {}
    }
    /// State trait tracking which required fields have been set
    pub trait State: sealed::Sealed {
        type Uri;
        type Name;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Uri = Unset;
        type Name = Unset;
    }
    ///State transition - sets the `uri` field to Set
    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;
    }
    ///State transition - sets the `name` field to Set
    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>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `uri` field
        pub struct uri(());
        ///Marker type for the `name` field
        pub struct name(());
    }
}

/// Builder for constructing an instance of this type
pub struct PutGameBuilder<'a, S: put_game_state::State> {
    _state: PhantomData<fn() -> S>,
    _fields: (
        Option<Vec<AgeRating<'a>>>,
        Option<Vec<AlternativeName<'a>>>,
        Option<ApplicationType<'a>>,
        Option<Datetime>,
        Option<Vec<AtUri<'a>>>,
        Option<Vec<Genre<'a>>>,
        Option<Vec<CowStr<'a>>>,
        Option<Vec<LanguageSupport<'a>>>,
        Option<Vec<MediaItem<'a>>>,
        Option<Vec<Mode<'a>>>,
        Option<Vec<MultiplayerMode<'a>>>,
        Option<CowStr<'a>>,
        Option<AtUri<'a>>,
        Option<Vec<PlayerPerspective<'a>>>,
        Option<Vec<Release<'a>>>,
        Option<bool>,
        Option<CowStr<'a>>,
        Option<CowStr<'a>>,
        Option<Vec<Theme<'a>>>,
        Option<TimeToBeat<'a>>,
        Option<AtUri<'a>>,
        Option<Vec<ExternalVideo<'a>>>,
        Option<Vec<Website<'a>>>,
    ),
    _lifetime: PhantomData<&'a ()>,
}

impl<'a> PutGame<'a> {
    /// Create a new builder for this type
    pub fn new() -> PutGameBuilder<'a, put_game_state::Empty> {
        PutGameBuilder::new()
    }
}

impl<'a> PutGameBuilder<'a, put_game_state::Empty> {
    /// Create a new builder with all fields unset
    pub fn new() -> Self {
        PutGameBuilder {
            _state: PhantomData,
            _fields: (
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
            ),
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `ageRatings` field (optional)
    pub fn age_ratings(mut self, value: impl Into<Option<Vec<AgeRating<'a>>>>) -> Self {
        self._fields.0 = value.into();
        self
    }
    /// Set the `ageRatings` field to an Option value (optional)
    pub fn maybe_age_ratings(mut self, value: Option<Vec<AgeRating<'a>>>) -> Self {
        self._fields.0 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `alternativeNames` field (optional)
    pub fn alternative_names(
        mut self,
        value: impl Into<Option<Vec<AlternativeName<'a>>>>,
    ) -> Self {
        self._fields.1 = value.into();
        self
    }
    /// Set the `alternativeNames` field to an Option value (optional)
    pub fn maybe_alternative_names(
        mut self,
        value: Option<Vec<AlternativeName<'a>>>,
    ) -> Self {
        self._fields.1 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `applicationType` field (optional)
    pub fn application_type(
        mut self,
        value: impl Into<Option<ApplicationType<'a>>>,
    ) -> Self {
        self._fields.2 = value.into();
        self
    }
    /// Set the `applicationType` field to an Option value (optional)
    pub fn maybe_application_type(mut self, value: Option<ApplicationType<'a>>) -> Self {
        self._fields.2 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `createdAt` field (optional)
    pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.3 = value.into();
        self
    }
    /// Set the `createdAt` field to an Option value (optional)
    pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
        self._fields.3 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `engines` field (optional)
    pub fn engines(mut self, value: impl Into<Option<Vec<AtUri<'a>>>>) -> Self {
        self._fields.4 = value.into();
        self
    }
    /// Set the `engines` field to an Option value (optional)
    pub fn maybe_engines(mut self, value: Option<Vec<AtUri<'a>>>) -> Self {
        self._fields.4 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `genres` field (optional)
    pub fn genres(mut self, value: impl Into<Option<Vec<Genre<'a>>>>) -> Self {
        self._fields.5 = value.into();
        self
    }
    /// Set the `genres` field to an Option value (optional)
    pub fn maybe_genres(mut self, value: Option<Vec<Genre<'a>>>) -> Self {
        self._fields.5 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `keywords` field (optional)
    pub fn keywords(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> Self {
        self._fields.6 = value.into();
        self
    }
    /// Set the `keywords` field to an Option value (optional)
    pub fn maybe_keywords(mut self, value: Option<Vec<CowStr<'a>>>) -> Self {
        self._fields.6 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `languageSupports` field (optional)
    pub fn language_supports(
        mut self,
        value: impl Into<Option<Vec<LanguageSupport<'a>>>>,
    ) -> Self {
        self._fields.7 = value.into();
        self
    }
    /// Set the `languageSupports` field to an Option value (optional)
    pub fn maybe_language_supports(
        mut self,
        value: Option<Vec<LanguageSupport<'a>>>,
    ) -> Self {
        self._fields.7 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `media` field (optional)
    pub fn media(mut self, value: impl Into<Option<Vec<MediaItem<'a>>>>) -> Self {
        self._fields.8 = value.into();
        self
    }
    /// Set the `media` field to an Option value (optional)
    pub fn maybe_media(mut self, value: Option<Vec<MediaItem<'a>>>) -> Self {
        self._fields.8 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `modes` field (optional)
    pub fn modes(mut self, value: impl Into<Option<Vec<Mode<'a>>>>) -> Self {
        self._fields.9 = value.into();
        self
    }
    /// Set the `modes` field to an Option value (optional)
    pub fn maybe_modes(mut self, value: Option<Vec<Mode<'a>>>) -> Self {
        self._fields.9 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `multiplayerModes` field (optional)
    pub fn multiplayer_modes(
        mut self,
        value: impl Into<Option<Vec<MultiplayerMode<'a>>>>,
    ) -> Self {
        self._fields.10 = value.into();
        self
    }
    /// Set the `multiplayerModes` field to an Option value (optional)
    pub fn maybe_multiplayer_modes(
        mut self,
        value: Option<Vec<MultiplayerMode<'a>>>,
    ) -> Self {
        self._fields.10 = value;
        self
    }
}

impl<'a, S> PutGameBuilder<'a, S>
where
    S: put_game_state::State,
    S::Name: put_game_state::IsUnset,
{
    /// Set the `name` field (required)
    pub fn name(
        mut self,
        value: impl Into<CowStr<'a>>,
    ) -> PutGameBuilder<'a, put_game_state::SetName<S>> {
        self._fields.11 = Option::Some(value.into());
        PutGameBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `parent` field (optional)
    pub fn parent(mut self, value: impl Into<Option<AtUri<'a>>>) -> Self {
        self._fields.12 = value.into();
        self
    }
    /// Set the `parent` field to an Option value (optional)
    pub fn maybe_parent(mut self, value: Option<AtUri<'a>>) -> Self {
        self._fields.12 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `playerPerspectives` field (optional)
    pub fn player_perspectives(
        mut self,
        value: impl Into<Option<Vec<PlayerPerspective<'a>>>>,
    ) -> Self {
        self._fields.13 = value.into();
        self
    }
    /// Set the `playerPerspectives` field to an Option value (optional)
    pub fn maybe_player_perspectives(
        mut self,
        value: Option<Vec<PlayerPerspective<'a>>>,
    ) -> Self {
        self._fields.13 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `releases` field (optional)
    pub fn releases(mut self, value: impl Into<Option<Vec<Release<'a>>>>) -> Self {
        self._fields.14 = value.into();
        self
    }
    /// Set the `releases` field to an Option value (optional)
    pub fn maybe_releases(mut self, value: Option<Vec<Release<'a>>>) -> Self {
        self._fields.14 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `shouldPublish` field (optional)
    pub fn should_publish(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.15 = value.into();
        self
    }
    /// Set the `shouldPublish` field to an Option value (optional)
    pub fn maybe_should_publish(mut self, value: Option<bool>) -> Self {
        self._fields.15 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `storyline` field (optional)
    pub fn storyline(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
        self._fields.16 = value.into();
        self
    }
    /// Set the `storyline` field to an Option value (optional)
    pub fn maybe_storyline(mut self, value: Option<CowStr<'a>>) -> Self {
        self._fields.16 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `summary` field (optional)
    pub fn summary(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
        self._fields.17 = value.into();
        self
    }
    /// Set the `summary` field to an Option value (optional)
    pub fn maybe_summary(mut self, value: Option<CowStr<'a>>) -> Self {
        self._fields.17 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `themes` field (optional)
    pub fn themes(mut self, value: impl Into<Option<Vec<Theme<'a>>>>) -> Self {
        self._fields.18 = value.into();
        self
    }
    /// Set the `themes` field to an Option value (optional)
    pub fn maybe_themes(mut self, value: Option<Vec<Theme<'a>>>) -> Self {
        self._fields.18 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `timeToBeat` field (optional)
    pub fn time_to_beat(mut self, value: impl Into<Option<TimeToBeat<'a>>>) -> Self {
        self._fields.19 = value.into();
        self
    }
    /// Set the `timeToBeat` field to an Option value (optional)
    pub fn maybe_time_to_beat(mut self, value: Option<TimeToBeat<'a>>) -> Self {
        self._fields.19 = value;
        self
    }
}

impl<'a, S> PutGameBuilder<'a, S>
where
    S: put_game_state::State,
    S::Uri: put_game_state::IsUnset,
{
    /// Set the `uri` field (required)
    pub fn uri(
        mut self,
        value: impl Into<AtUri<'a>>,
    ) -> PutGameBuilder<'a, put_game_state::SetUri<S>> {
        self._fields.20 = Option::Some(value.into());
        PutGameBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `videos` field (optional)
    pub fn videos(mut self, value: impl Into<Option<Vec<ExternalVideo<'a>>>>) -> Self {
        self._fields.21 = value.into();
        self
    }
    /// Set the `videos` field to an Option value (optional)
    pub fn maybe_videos(mut self, value: Option<Vec<ExternalVideo<'a>>>) -> Self {
        self._fields.21 = value;
        self
    }
}

impl<'a, S: put_game_state::State> PutGameBuilder<'a, S> {
    /// Set the `websites` field (optional)
    pub fn websites(mut self, value: impl Into<Option<Vec<Website<'a>>>>) -> Self {
        self._fields.22 = value.into();
        self
    }
    /// Set the `websites` field to an Option value (optional)
    pub fn maybe_websites(mut self, value: Option<Vec<Website<'a>>>) -> Self {
        self._fields.22 = value;
        self
    }
}

impl<'a, S> PutGameBuilder<'a, S>
where
    S: put_game_state::State,
    S::Uri: put_game_state::IsSet,
    S::Name: put_game_state::IsSet,
{
    /// Build the final struct
    pub fn build(self) -> PutGame<'a> {
        PutGame {
            age_ratings: self._fields.0,
            alternative_names: self._fields.1,
            application_type: self._fields.2,
            created_at: self._fields.3,
            engines: self._fields.4,
            genres: self._fields.5,
            keywords: self._fields.6,
            language_supports: self._fields.7,
            media: self._fields.8,
            modes: self._fields.9,
            multiplayer_modes: self._fields.10,
            name: self._fields.11.unwrap(),
            parent: self._fields.12,
            player_perspectives: self._fields.13,
            releases: self._fields.14,
            should_publish: self._fields.15,
            storyline: self._fields.16,
            summary: self._fields.17,
            themes: self._fields.18,
            time_to_beat: self._fields.19,
            uri: self._fields.20.unwrap(),
            videos: self._fields.21,
            websites: self._fields.22,
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<
            jacquard_common::deps::smol_str::SmolStr,
            jacquard_common::types::value::Data<'a>,
        >,
    ) -> PutGame<'a> {
        PutGame {
            age_ratings: self._fields.0,
            alternative_names: self._fields.1,
            application_type: self._fields.2,
            created_at: self._fields.3,
            engines: self._fields.4,
            genres: self._fields.5,
            keywords: self._fields.6,
            language_supports: self._fields.7,
            media: self._fields.8,
            modes: self._fields.9,
            multiplayer_modes: self._fields.10,
            name: self._fields.11.unwrap(),
            parent: self._fields.12,
            player_perspectives: self._fields.13,
            releases: self._fields.14,
            should_publish: self._fields.15,
            storyline: self._fields.16,
            summary: self._fields.17,
            themes: self._fields.18,
            time_to_beat: self._fields.19,
            uri: self._fields.20.unwrap(),
            videos: self._fields.21,
            websites: self._fields.22,
            extra_data: Some(extra_data),
        }
    }
}