mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-05-06 06:47:28 +00:00
Release v1.3.0
This commit is contained in:
parent
33d76d7a4e
commit
dfa1dfb1c8
64 changed files with 3285 additions and 1329 deletions
36
src/models/search.rs
Normal file
36
src/models/search.rs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Search {
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: models::SearchType,
|
||||
#[serde(rename = "query", deserialize_with = "Option::deserialize")]
|
||||
pub query: Option<String>,
|
||||
#[serde(rename = "page", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub page: Option<Option<i32>>,
|
||||
#[serde(rename = "game_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_id: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl Search {
|
||||
pub fn new(r#type: models::SearchType, query: Option<String>) -> Search {
|
||||
Search {
|
||||
r#type,
|
||||
query,
|
||||
page: None,
|
||||
game_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue