Skip to content

Commit

Permalink
CI: regenerate [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono authored and actions-user committed Dec 8, 2023
1 parent 6e15377 commit 80c3759
Show file tree
Hide file tree
Showing 18 changed files with 144 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/StampApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ Name | Type | Description | Required | Notes

## get_stamps

> Vec<crate::models::Stamp> get_stamps(include_unicode, r#type)
> Vec<crate::models::StampWithThumbnail> get_stamps(include_unicode, r#type)
スタンプリストを取得

スタンプのリストを取得します。
Expand All @@ -494,7 +494,7 @@ Name | Type | Description | Required | Notes

### Return type

[**Vec<crate::models::Stamp>**](Stamp.md)
[**Vec<crate::models::StampWithThumbnail>**](StampWithThumbnail.md)

### Authorization

Expand Down
18 changes: 18 additions & 0 deletions docs/StampWithThumbnail.md
Original file line number Diff line number Diff line change
@@ -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)


4 changes: 2 additions & 2 deletions src/apis/bot_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeBotIconError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/apis/file_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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<crate::models::FileInfo, Error<PostFileError>> {
let local_var_configuration = configuration;
Expand Down
4 changes: 2 additions & 2 deletions src/apis/group_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeUserGroupIconError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/apis/me_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeMyIconError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down
5 changes: 1 addition & 4 deletions src/apis/oauth2_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
8 changes: 4 additions & 4 deletions src/apis/stamp_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeStampImageError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down Expand Up @@ -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<crate::models::Stamp, Error<CreateStampError>> {
let local_var_configuration = configuration;

Expand Down Expand Up @@ -890,7 +890,7 @@ pub async fn get_stamps(
configuration: &configuration::Configuration,
include_unicode: Option<bool>,
r#type: Option<&str>,
) -> Result<Vec<crate::models::Stamp>, Error<GetStampsError>> {
) -> Result<Vec<crate::models::StampWithThumbnail>, Error<GetStampsError>> {
let local_var_configuration = configuration;

let local_var_client = &local_var_configuration.client;
Expand Down
4 changes: 2 additions & 2 deletions src/apis/user_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeUserIconError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/apis/webhook_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChangeWebhookIconError>> {
let local_var_configuration = configuration;

Expand All @@ -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);

Expand Down
24 changes: 11 additions & 13 deletions src/models/bot_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
24 changes: 11 additions & 13 deletions src/models/channel_subscribe_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
6 changes: 5 additions & 1 deletion src/models/file_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 2 additions & 0 deletions src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
64 changes: 64 additions & 0 deletions src/models/stamp_with_thumbnail.rs
Original file line number Diff line number Diff line change
@@ -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,
}
}
}
Loading

0 comments on commit 80c3759

Please sign in to comment.