From 664fb1ffd4f42e09f224d943b5166fdc02f22530 Mon Sep 17 00:00:00 2001 From: Foorack Date: Thu, 28 Oct 2021 19:13:06 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.0.0 --- .openapi-generator/FILES | 1 - Cargo.toml | 2 +- git_push.sh | 7 ++++--- src/models/deployment_group.rs | 6 ++++++ src/models/developer_type.rs | 6 ++++++ src/models/favorite_group_visibility.rs | 6 ++++++ src/models/favorite_type.rs | 6 ++++++ src/models/file_status.rs | 6 ++++++ src/models/invite_message_type.rs | 6 ++++++ src/models/mime_type.rs | 6 ++++++ src/models/notification_type.rs | 6 ++++++ src/models/player_moderation_type.rs | 6 ++++++ src/models/release_status.rs | 6 ++++++ src/models/user_state.rs | 6 ++++++ src/models/user_status.rs | 6 ++++++ 15 files changed, 77 insertions(+), 5 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c4211cd..d7b2045 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.gitignore .travis.yml Cargo.toml docs/ApiConfig.md diff --git a/Cargo.toml b/Cargo.toml index 5495bf0..317719a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.4.2" +version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/git_push.sh b/git_push.sh index 4f224bc..f728a45 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=$(git remote) +git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,3 +55,4 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/models/deployment_group.rs b/src/models/deployment_group.rs index 1d01769..c7bfd1a 100644 --- a/src/models/deployment_group.rs +++ b/src/models/deployment_group.rs @@ -33,6 +33,12 @@ impl ToString for DeploymentGroup { } } +impl Default for DeploymentGroup { + fn default() -> DeploymentGroup { + Self::Blue + } +} + diff --git a/src/models/developer_type.rs b/src/models/developer_type.rs index 57d480c..cb0a72a 100644 --- a/src/models/developer_type.rs +++ b/src/models/developer_type.rs @@ -33,6 +33,12 @@ impl ToString for DeveloperType { } } +impl Default for DeveloperType { + fn default() -> DeveloperType { + Self::None + } +} + diff --git a/src/models/favorite_group_visibility.rs b/src/models/favorite_group_visibility.rs index 32a8983..bbfcd04 100644 --- a/src/models/favorite_group_visibility.rs +++ b/src/models/favorite_group_visibility.rs @@ -29,6 +29,12 @@ impl ToString for FavoriteGroupVisibility { } } +impl Default for FavoriteGroupVisibility { + fn default() -> FavoriteGroupVisibility { + Self::Private + } +} + diff --git a/src/models/favorite_type.rs b/src/models/favorite_type.rs index 3afee8a..4a0a8da 100644 --- a/src/models/favorite_type.rs +++ b/src/models/favorite_type.rs @@ -29,6 +29,12 @@ impl ToString for FavoriteType { } } +impl Default for FavoriteType { + fn default() -> FavoriteType { + Self::World + } +} + diff --git a/src/models/file_status.rs b/src/models/file_status.rs index bca849d..2ad1ebb 100644 --- a/src/models/file_status.rs +++ b/src/models/file_status.rs @@ -29,6 +29,12 @@ impl ToString for FileStatus { } } +impl Default for FileStatus { + fn default() -> FileStatus { + Self::Waiting + } +} + diff --git a/src/models/invite_message_type.rs b/src/models/invite_message_type.rs index ad21e35..a7b3b69 100644 --- a/src/models/invite_message_type.rs +++ b/src/models/invite_message_type.rs @@ -23,6 +23,12 @@ impl ToString for InviteMessageType { } } +impl Default for InviteMessageType { + fn default() -> InviteMessageType { + Self::Message + } +} + diff --git a/src/models/mime_type.rs b/src/models/mime_type.rs index f6b7c13..f349d7b 100644 --- a/src/models/mime_type.rs +++ b/src/models/mime_type.rs @@ -62,6 +62,12 @@ impl ToString for MimeType { } } +impl Default for MimeType { + fn default() -> MimeType { + Self::ImageJpeg + } +} + diff --git a/src/models/notification_type.rs b/src/models/notification_type.rs index e544b80..f8a5b3d 100644 --- a/src/models/notification_type.rs +++ b/src/models/notification_type.rs @@ -38,6 +38,12 @@ impl ToString for NotificationType { } } +impl Default for NotificationType { + fn default() -> NotificationType { + Self::FriendRequest + } +} + diff --git a/src/models/player_moderation_type.rs b/src/models/player_moderation_type.rs index 96fc9ed..40cf81b 100644 --- a/src/models/player_moderation_type.rs +++ b/src/models/player_moderation_type.rs @@ -38,6 +38,12 @@ impl ToString for PlayerModerationType { } } +impl Default for PlayerModerationType { + fn default() -> PlayerModerationType { + Self::Mute + } +} + diff --git a/src/models/release_status.rs b/src/models/release_status.rs index 9ef7568..d4e6468 100644 --- a/src/models/release_status.rs +++ b/src/models/release_status.rs @@ -29,6 +29,12 @@ impl ToString for ReleaseStatus { } } +impl Default for ReleaseStatus { + fn default() -> ReleaseStatus { + Self::Public + } +} + diff --git a/src/models/user_state.rs b/src/models/user_state.rs index 744a290..2e93abf 100644 --- a/src/models/user_state.rs +++ b/src/models/user_state.rs @@ -30,6 +30,12 @@ impl ToString for UserState { } } +impl Default for UserState { + fn default() -> UserState { + Self::Offline + } +} + diff --git a/src/models/user_status.rs b/src/models/user_status.rs index 5a33e8d..3f2bf84 100644 --- a/src/models/user_status.rs +++ b/src/models/user_status.rs @@ -36,6 +36,12 @@ impl ToString for UserStatus { } } +impl Default for UserStatus { + fn default() -> UserStatus { + Self::Active + } +} +