From 80c375910f8024b0461659dfd3bac7799a7dd579 Mon Sep 17 00:00:00 2001 From: H1rono <54711422+H1rono@users.noreply.github.com> Date: Fri, 8 Dec 2023 05:45:10 +0000 Subject: [PATCH] CI: regenerate [skip ci] --- .openapi-generator/FILES | 2 + docs/README.md | 1 + docs/StampApi.md | 4 +- docs/StampWithThumbnail.md | 18 ++++++++ src/apis/bot_api.rs | 4 +- src/apis/file_api.rs | 4 +- src/apis/group_api.rs | 4 +- src/apis/me_api.rs | 4 +- src/apis/oauth2_api.rs | 5 +-- src/apis/stamp_api.rs | 8 ++-- src/apis/user_api.rs | 4 +- src/apis/webhook_api.rs | 4 +- src/models/bot_state.rs | 24 +++++----- src/models/channel_subscribe_level.rs | 24 +++++----- src/models/file_info.rs | 6 ++- src/models/mod.rs | 2 + src/models/stamp_with_thumbnail.rs | 64 +++++++++++++++++++++++++++ src/models/user_account_state.rs | 24 +++++----- 18 files changed, 144 insertions(+), 62 deletions(-) create mode 100644 docs/StampWithThumbnail.md create mode 100644 src/models/stamp_with_thumbnail.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7af6732..1c5f771 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -111,6 +111,7 @@ docs/StampApi.md docs/StampHistoryEntry.md docs/StampPalette.md docs/StampStats.md +docs/StampWithThumbnail.md docs/StarApi.md docs/SubscribersChangedEvent.md docs/Tag.md @@ -261,6 +262,7 @@ src/models/stamp.rs src/models/stamp_history_entry.rs src/models/stamp_palette.rs src/models/stamp_stats.rs +src/models/stamp_with_thumbnail.rs src/models/subscribers_changed_event.rs src/models/tag.rs src/models/thumbnail_info.rs diff --git a/docs/README.md b/docs/README.md index f9cc3b3..b03128f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -326,6 +326,7 @@ Class | Method | HTTP request | Description - [StampHistoryEntry](StampHistoryEntry.md) - [StampPalette](StampPalette.md) - [StampStats](StampStats.md) + - [StampWithThumbnail](StampWithThumbnail.md) - [SubscribersChangedEvent](SubscribersChangedEvent.md) - [Tag](Tag.md) - [ThumbnailInfo](ThumbnailInfo.md) diff --git a/docs/StampApi.md b/docs/StampApi.md index 35f0772..e2cd21b 100644 --- a/docs/StampApi.md +++ b/docs/StampApi.md @@ -479,7 +479,7 @@ Name | Type | Description | Required | Notes ## get_stamps -> Vec get_stamps(include_unicode, r#type) +> Vec get_stamps(include_unicode, r#type) スタンプリストを取得 スタンプのリストを取得します。 @@ -494,7 +494,7 @@ Name | Type | Description | Required | Notes ### Return type -[**Vec**](Stamp.md) +[**Vec**](StampWithThumbnail.md) ### Authorization diff --git a/docs/StampWithThumbnail.md b/docs/StampWithThumbnail.md new file mode 100644 index 0000000..81eb836 --- /dev/null +++ b/docs/StampWithThumbnail.md @@ -0,0 +1,18 @@ +# StampWithThumbnail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**uuid::Uuid**](uuid::Uuid.md) | スタンプUUID | +**name** | **String** | スタンプ名 | +**creator_id** | [**uuid::Uuid**](uuid::Uuid.md) | 作成者UUID | +**created_at** | **String** | 作成日時 | +**updated_at** | **String** | 更新日時 | +**file_id** | [**uuid::Uuid**](uuid::Uuid.md) | ファイルUUID | +**is_unicode** | **bool** | Unicode絵文字か | +**has_thumbnail** | **bool** | サムネイルの有無 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/apis/bot_api.rs b/src/apis/bot_api.rs index 427effe..48903e0 100644 --- a/src/apis/bot_api.rs +++ b/src/apis/bot_api.rs @@ -199,7 +199,7 @@ pub async fn activate_bot( pub async fn change_bot_icon( configuration: &configuration::Configuration, bot_id: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -223,7 +223,7 @@ pub async fn change_bot_icon( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); diff --git a/src/apis/file_api.rs b/src/apis/file_api.rs index c2c6cd6..1011223 100644 --- a/src/apis/file_api.rs +++ b/src/apis/file_api.rs @@ -11,7 +11,7 @@ use reqwest; use super::{configuration, Error}; -use crate::{apis::ResponseContent, models::ThumbnailType}; +use crate::apis::ResponseContent; /// struct for typed errors of method [`delete_file`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -352,7 +352,7 @@ pub async fn get_thumbnail_image( /// 指定したチャンネルにファイルをアップロードします。 アーカイブされているチャンネルにはアップロード出来ません。 pub async fn post_file( configuration: &configuration::Configuration, - _file: std::path::PathBuf, + file: std::path::PathBuf, channel_id: &str, ) -> Result> { let local_var_configuration = configuration; diff --git a/src/apis/group_api.rs b/src/apis/group_api.rs index 0978d18..29bfc87 100644 --- a/src/apis/group_api.rs +++ b/src/apis/group_api.rs @@ -237,7 +237,7 @@ pub async fn add_user_group_member( pub async fn change_user_group_icon( configuration: &configuration::Configuration, group_id: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -261,7 +261,7 @@ pub async fn change_user_group_icon( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); diff --git a/src/apis/me_api.rs b/src/apis/me_api.rs index e1cf65c..aef6be9 100644 --- a/src/apis/me_api.rs +++ b/src/apis/me_api.rs @@ -336,7 +336,7 @@ pub async fn add_my_user_tag( /// 自分のアイコン画像を変更します。 pub async fn change_my_icon( configuration: &configuration::Configuration, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -356,7 +356,7 @@ pub async fn change_my_icon( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); diff --git a/src/apis/oauth2_api.rs b/src/apis/oauth2_api.rs index 3522549..a848a57 100644 --- a/src/apis/oauth2_api.rs +++ b/src/apis/oauth2_api.rs @@ -11,10 +11,7 @@ use reqwest; use super::{configuration, Error}; -use crate::{ - apis::ResponseContent, - models::{OAuth2Prompt, OAuth2ResponseType}, -}; +use crate::apis::ResponseContent; /// struct for typed errors of method [`create_client`] #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/apis/stamp_api.rs b/src/apis/stamp_api.rs index 439ee17..da1f981 100644 --- a/src/apis/stamp_api.rs +++ b/src/apis/stamp_api.rs @@ -214,7 +214,7 @@ pub async fn add_message_stamp( pub async fn change_stamp_image( configuration: &configuration::Configuration, stamp_id: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -238,7 +238,7 @@ pub async fn change_stamp_image( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); @@ -266,7 +266,7 @@ pub async fn change_stamp_image( pub async fn create_stamp( configuration: &configuration::Configuration, name: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result> { let local_var_configuration = configuration; @@ -890,7 +890,7 @@ pub async fn get_stamps( configuration: &configuration::Configuration, include_unicode: Option, r#type: Option<&str>, -) -> Result, Error> { +) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; diff --git a/src/apis/user_api.rs b/src/apis/user_api.rs index 61a133d..0881736 100644 --- a/src/apis/user_api.rs +++ b/src/apis/user_api.rs @@ -203,7 +203,7 @@ pub async fn add_user_tag( pub async fn change_user_icon( configuration: &configuration::Configuration, user_id: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -227,7 +227,7 @@ pub async fn change_user_icon( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); diff --git a/src/apis/webhook_api.rs b/src/apis/webhook_api.rs index 76bf370..c9ea462 100644 --- a/src/apis/webhook_api.rs +++ b/src/apis/webhook_api.rs @@ -93,7 +93,7 @@ pub enum PostWebhookError { pub async fn change_webhook_icon( configuration: &configuration::Configuration, webhook_id: &str, - _file: std::path::PathBuf, + file: std::path::PathBuf, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -117,7 +117,7 @@ pub async fn change_webhook_icon( if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - let local_var_form = reqwest::multipart::Form::new(); + let mut local_var_form = reqwest::multipart::Form::new(); // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); diff --git a/src/models/bot_state.rs b/src/models/bot_state.rs index 16f091e..03f04df 100644 --- a/src/models/bot_state.rs +++ b/src/models/bot_state.rs @@ -8,33 +8,31 @@ * Generated by: https://openapi-generator.tech */ -use serde_repr::{Deserialize_repr, Serialize_repr}; - /// BotState : BOT状態 0: 停止 1: 有効 2: 一時停止 /// BOT状態 0: 停止 1: 有効 2: 一時停止 -#[derive( - Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, -)] -#[repr(u8)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum BotState { - Deactivated = 0, - Active = 1, - Suspended = 2, + #[serde(rename = "0")] + deactivated, + #[serde(rename = "1")] + active, + #[serde(rename = "2")] + suspended, } impl ToString for BotState { fn to_string(&self) -> String { match self { - Self::Deactivated => String::from("0"), - Self::Active => String::from("1"), - Self::Suspended => String::from("2"), + Self::deactivated => String::from("0"), + Self::active => String::from("1"), + Self::suspended => String::from("2"), } } } impl Default for BotState { fn default() -> BotState { - Self::Deactivated + Self::deactivated } } diff --git a/src/models/channel_subscribe_level.rs b/src/models/channel_subscribe_level.rs index 701c646..f3c0b66 100644 --- a/src/models/channel_subscribe_level.rs +++ b/src/models/channel_subscribe_level.rs @@ -8,33 +8,31 @@ * Generated by: https://openapi-generator.tech */ -use serde_repr::{Deserialize_repr, Serialize_repr}; - /// ChannelSubscribeLevel : チャンネル購読レベル 0:無し 1:未読管理 2:未読管理+通知 /// チャンネル購読レベル 0:無し 1:未読管理 2:未読管理+通知 -#[derive( - Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, -)] -#[repr(u8)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ChannelSubscribeLevel { - None = 0, - Subscribed = 1, - Notified = 2, + #[serde(rename = "0")] + none, + #[serde(rename = "1")] + subscribed, + #[serde(rename = "2")] + notified, } impl ToString for ChannelSubscribeLevel { fn to_string(&self) -> String { match self { - Self::None => String::from("0"), - Self::Subscribed => String::from("1"), - Self::Notified => String::from("2"), + Self::none => String::from("0"), + Self::subscribed => String::from("1"), + Self::notified => String::from("2"), } } } impl Default for ChannelSubscribeLevel { fn default() -> ChannelSubscribeLevel { - Self::None + Self::none } } diff --git a/src/models/file_info.rs b/src/models/file_info.rs index 9a97bbb..b15cdd4 100644 --- a/src/models/file_info.rs +++ b/src/models/file_info.rs @@ -69,7 +69,11 @@ impl FileInfo { is_animated_image, created_at, thumbnails, - thumbnail: thumbnail.map(Box::new), + thumbnail: if let Some(x) = thumbnail { + Some(Box::new(x)) + } else { + None + }, channel_id, uploader_id, } diff --git a/src/models/mod.rs b/src/models/mod.rs index 32aa62d..d53757d 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -192,6 +192,8 @@ pub mod stamp_palette; pub use self::stamp_palette::StampPalette; pub mod stamp_stats; pub use self::stamp_stats::StampStats; +pub mod stamp_with_thumbnail; +pub use self::stamp_with_thumbnail::StampWithThumbnail; pub mod subscribers_changed_event; pub use self::subscribers_changed_event::SubscribersChangedEvent; pub mod tag; diff --git a/src/models/stamp_with_thumbnail.rs b/src/models/stamp_with_thumbnail.rs new file mode 100644 index 0000000..92c0d0a --- /dev/null +++ b/src/models/stamp_with_thumbnail.rs @@ -0,0 +1,64 @@ +/* + * traQ v3 + * + * traQ v3 API + * + * The version of the OpenAPI document: 3.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// StampWithThumbnail : スタンプ情報とサムネイルの有無 + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct StampWithThumbnail { + /// スタンプUUID + #[serde(rename = "id")] + pub id: uuid::Uuid, + /// スタンプ名 + #[serde(rename = "name")] + pub name: String, + /// 作成者UUID + #[serde(rename = "creatorId")] + pub creator_id: uuid::Uuid, + /// 作成日時 + #[serde(rename = "createdAt")] + pub created_at: String, + /// 更新日時 + #[serde(rename = "updatedAt")] + pub updated_at: String, + /// ファイルUUID + #[serde(rename = "fileId")] + pub file_id: uuid::Uuid, + /// Unicode絵文字か + #[serde(rename = "isUnicode")] + pub is_unicode: bool, + /// サムネイルの有無 + #[serde(rename = "hasThumbnail")] + pub has_thumbnail: bool, +} + +impl StampWithThumbnail { + /// スタンプ情報とサムネイルの有無 + pub fn new( + id: uuid::Uuid, + name: String, + creator_id: uuid::Uuid, + created_at: String, + updated_at: String, + file_id: uuid::Uuid, + is_unicode: bool, + has_thumbnail: bool, + ) -> StampWithThumbnail { + StampWithThumbnail { + id, + name, + creator_id, + created_at, + updated_at, + file_id, + is_unicode, + has_thumbnail, + } + } +} diff --git a/src/models/user_account_state.rs b/src/models/user_account_state.rs index a2f77cb..ebc7d43 100644 --- a/src/models/user_account_state.rs +++ b/src/models/user_account_state.rs @@ -8,33 +8,31 @@ * Generated by: https://openapi-generator.tech */ -use serde_repr::{Deserialize_repr, Serialize_repr}; - /// UserAccountState : ユーザーアカウント状態 0: 停止 1: 有効 2: 一時停止 /// ユーザーアカウント状態 0: 停止 1: 有効 2: 一時停止 -#[derive( - Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, -)] -#[repr(u8)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum UserAccountState { - Deactivated = 0, - Active = 1, - Suspended = 2, + #[serde(rename = "0")] + deactivated, + #[serde(rename = "1")] + active, + #[serde(rename = "2")] + suspended, } impl ToString for UserAccountState { fn to_string(&self) -> String { match self { - Self::Deactivated => String::from("0"), - Self::Active => String::from("1"), - Self::Suspended => String::from("2"), + Self::deactivated => String::from("0"), + Self::active => String::from("1"), + Self::suspended => String::from("2"), } } } impl Default for UserAccountState { fn default() -> UserAccountState { - Self::Deactivated + Self::deactivated } }