From 000e0252cd386f25d3effff58657053f05bb9ca6 Mon Sep 17 00:00:00 2001 From: Ching Date: Mon, 11 Mar 2024 18:19:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20memos=20api=20clie?= =?UTF-8?q?nt=EF=BC=9B=20=E5=A2=9E=E5=8A=A0=E7=BB=99=E5=B8=A6=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=20memo=20=E5=A2=9E=E5=8A=A0=20tag=20=E7=9A=84?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 108 +- .swagger-codegen-ignore | 23 + .swagger-codegen/VERSION | 1 + .travis.yml | 13 + README.md | 234 ++- config.json | 6 + docs/ActivityServiceApi.md | 54 + docs/Apiv2ActivityMemoCommentPayload.md | 10 + docs/Apiv2ActivityPayload.md | 10 + docs/Apiv2ActivityVersionUpdatePayload.md | 9 + docs/Apiv2Reaction.md | 12 + docs/Apiv2ReactionType.md | 8 + docs/Apiv2RowStatus.md | 8 + docs/Apiv2UserSetting.md | 13 + docs/Apiv2Webhook.md | 15 + docs/Apiv2WorkspaceGeneralSetting.md | 13 + docs/Apiv2WorkspaceSetting.md | 10 + docs/AuthServiceApi.md | 244 +++ docs/GooglerpcStatus.md | 11 + docs/InboxServiceApi.md | 150 ++ docs/MemoServiceApi.md | 834 ++++++++ docs/MemoServiceSetMemoRelationsBody.md | 9 + docs/MemoServiceSetMemoResourcesBody.md | 9 + docs/MemosMemoIdBody.md | 22 + docs/ProtobufAny.md | 8 + docs/ResourceServiceApi.md | 293 +++ docs/ResourcesResourceIdBody.md | 15 + docs/SettingIsTheSettingToUpdate_.md | 9 + docs/TagServiceApi.md | 291 +++ docs/UserRole.md | 8 + docs/UserServiceApi.md | 481 +++++ docs/UserServiceCreateUserAccessTokenBody.md | 10 + docs/V2Activity.md | 14 + docs/V2BatchUpsertTagResponse.md | 8 + docs/V2CreateMemoCommentResponse.md | 9 + docs/V2CreateMemoRequest.md | 10 + docs/V2CreateMemoResponse.md | 9 + docs/V2CreateResourceResponse.md | 9 + docs/V2CreateUserAccessTokenResponse.md | 9 + docs/V2CreateUserResponse.md | 9 + docs/V2CreateWebhookRequest.md | 10 + docs/V2CreateWebhookResponse.md | 9 + docs/V2DeleteInboxResponse.md | 8 + docs/V2DeleteMemoReactionResponse.md | 8 + docs/V2DeleteMemoResponse.md | 8 + docs/V2DeleteResourceResponse.md | 8 + docs/V2DeleteTagResponse.md | 8 + docs/V2DeleteUserAccessTokenResponse.md | 8 + docs/V2DeleteUserResponse.md | 8 + docs/V2DeleteWebhookResponse.md | 8 + docs/V2ExportMemosResponse.md | 9 + docs/V2GetActivityResponse.md | 9 + docs/V2GetAuthStatusResponse.md | 9 + docs/V2GetMemoByNameResponse.md | 9 + docs/V2GetMemoResponse.md | 9 + docs/V2GetResourceByNameResponse.md | 9 + docs/V2GetResourceResponse.md | 9 + docs/V2GetTagSuggestionsResponse.md | 9 + docs/V2GetUserMemosStatsResponse.md | 9 + docs/V2GetUserResponse.md | 9 + docs/V2GetUserSettingResponse.md | 9 + docs/V2GetWebhookResponse.md | 9 + docs/V2GetWorkspaceProfileResponse.md | 9 + docs/V2GetWorkspaceSettingResponse.md | 9 + docs/V2Inbox.md | 15 + docs/V2InboxNameBody.md | 14 + docs/V2InboxStatus.md | 8 + docs/V2InboxType.md | 8 + docs/V2ListInboxesResponse.md | 9 + docs/V2ListMemoCommentsResponse.md | 9 + docs/V2ListMemoReactionsResponse.md | 9 + docs/V2ListMemoRelationsResponse.md | 9 + docs/V2ListMemoResourcesResponse.md | 9 + docs/V2ListMemosResponse.md | 10 + docs/V2ListResourcesResponse.md | 9 + docs/V2ListTagsResponse.md | 9 + docs/V2ListUserAccessTokensResponse.md | 9 + docs/V2ListUsersResponse.md | 9 + docs/V2ListWebhooksResponse.md | 9 + docs/V2Memo.md | 23 + docs/V2MemoRelation.md | 11 + docs/V2MemoRelationType.md | 8 + docs/V2RenameTagResponse.md | 9 + docs/V2Resource.md | 16 + docs/V2SetMemoRelationsResponse.md | 8 + docs/V2SetMemoResourcesResponse.md | 8 + docs/V2SetWorkspaceSettingResponse.md | 9 + docs/V2SettingNameBody.md | 12 + docs/V2SignInResponse.md | 9 + docs/V2SignInWithSSOResponse.md | 9 + docs/V2SignOutResponse.md | 8 + docs/V2SignUpResponse.md | 9 + docs/V2Tag.md | 10 + docs/V2UpdateInboxResponse.md | 9 + docs/V2UpdateMemoResponse.md | 9 + docs/V2UpdateResourceResponse.md | 9 + docs/V2UpdateUserResponse.md | 9 + docs/V2UpdateUserSettingResponse.md | 9 + docs/V2UpdateWebhookResponse.md | 9 + docs/V2UpsertMemoReactionResponse.md | 9 + docs/V2UpsertTagRequest.md | 9 + docs/V2UpsertTagResponse.md | 9 + docs/V2User.md | 19 + docs/V2UserAccessToken.md | 12 + docs/V2UserNameBody.md | 18 + docs/V2Visibility.md | 8 + docs/V2WorkspaceProfile.md | 14 + docs/WebhookServiceApi.md | 244 +++ docs/WebhooksWebhookIdBody.md | 14 + docs/WorkspaceServiceApi.md | 50 + docs/WorkspaceSettingServiceApi.md | 103 + git_push.sh | 52 + main.py | 39 + memos/__init__.py | 126 ++ memos/api/__init__.py | 15 + memos/api/activity_service_api.py | 126 ++ memos/api/auth_service_api.py | 490 +++++ memos/api/inbox_service_api.py | 320 ++++ memos/api/memo_service_api.py | 1690 +++++++++++++++++ memos/api/resource_service_api.py | 603 ++++++ memos/api/tag_service_api.py | 575 ++++++ memos/api/user_service_api.py | 1003 ++++++++++ memos/api/webhook_service_api.py | 510 +++++ memos/api/workspace_service_api.py | 118 ++ memos/api/workspace_setting_service_api.py | 231 +++ memos/api_client.py | 632 ++++++ memos/configuration.py | 244 +++ memos/models/__init__.py | 111 ++ .../apiv2_activity_memo_comment_payload.py | 136 ++ memos/models/apiv2_activity_payload.py | 136 ++ .../apiv2_activity_version_update_payload.py | 110 ++ memos/models/apiv2_reaction.py | 188 ++ memos/models/apiv2_reaction_type.py | 101 + memos/models/apiv2_row_status.py | 91 + memos/models/apiv2_user_setting.py | 222 +++ memos/models/apiv2_webhook.py | 266 +++ .../models/apiv2_workspace_general_setting.py | 224 +++ memos/models/apiv2_workspace_setting.py | 136 ++ memos/models/googlerpc_status.py | 162 ++ .../memo_service_set_memo_relations_body.py | 110 ++ .../memo_service_set_memo_resources_body.py | 110 ++ memos/models/memos_memo_id_body.py | 450 +++++ memos/models/protobuf_any.py | 89 + memos/models/resources_resource_id_body.py | 268 +++ .../setting_is_the_setting_to_update_.py | 110 ++ memos/models/user_role.py | 92 + ...r_service_create_user_access_token_body.py | 136 ++ memos/models/v2_activity.py | 240 +++ memos/models/v2_batch_upsert_tag_response.py | 84 + .../models/v2_create_memo_comment_response.py | 110 ++ memos/models/v2_create_memo_request.py | 136 ++ memos/models/v2_create_memo_response.py | 110 ++ memos/models/v2_create_resource_response.py | 110 ++ .../v2_create_user_access_token_response.py | 110 ++ memos/models/v2_create_user_response.py | 110 ++ memos/models/v2_create_webhook_request.py | 136 ++ memos/models/v2_create_webhook_response.py | 110 ++ memos/models/v2_delete_inbox_response.py | 84 + .../v2_delete_memo_reaction_response.py | 84 + memos/models/v2_delete_memo_response.py | 84 + memos/models/v2_delete_resource_response.py | 84 + memos/models/v2_delete_tag_response.py | 84 + .../v2_delete_user_access_token_response.py | 84 + memos/models/v2_delete_user_response.py | 84 + memos/models/v2_delete_webhook_response.py | 84 + memos/models/v2_export_memos_response.py | 110 ++ memos/models/v2_get_activity_response.py | 110 ++ memos/models/v2_get_auth_status_response.py | 110 ++ memos/models/v2_get_memo_by_name_response.py | 110 ++ memos/models/v2_get_memo_response.py | 110 ++ .../v2_get_resource_by_name_response.py | 110 ++ memos/models/v2_get_resource_response.py | 110 ++ .../models/v2_get_tag_suggestions_response.py | 110 ++ .../v2_get_user_memos_stats_response.py | 112 ++ memos/models/v2_get_user_response.py | 110 ++ memos/models/v2_get_user_setting_response.py | 110 ++ memos/models/v2_get_webhook_response.py | 110 ++ .../v2_get_workspace_profile_response.py | 110 ++ .../v2_get_workspace_setting_response.py | 110 ++ memos/models/v2_inbox.py | 266 +++ memos/models/v2_inbox_name_body.py | 240 +++ memos/models/v2_inbox_status.py | 91 + memos/models/v2_inbox_type.py | 91 + memos/models/v2_list_inboxes_response.py | 110 ++ .../models/v2_list_memo_comments_response.py | 110 ++ .../models/v2_list_memo_reactions_response.py | 110 ++ .../models/v2_list_memo_relations_response.py | 110 ++ .../models/v2_list_memo_resources_response.py | 110 ++ memos/models/v2_list_memos_response.py | 138 ++ memos/models/v2_list_resources_response.py | 110 ++ memos/models/v2_list_tags_response.py | 110 ++ .../v2_list_user_access_tokens_response.py | 110 ++ memos/models/v2_list_users_response.py | 110 ++ memos/models/v2_list_webhooks_response.py | 110 ++ memos/models/v2_memo.py | 478 +++++ memos/models/v2_memo_relation.py | 162 ++ memos/models/v2_memo_relation_type.py | 91 + memos/models/v2_rename_tag_response.py | 110 ++ memos/models/v2_resource.py | 296 +++ .../models/v2_set_memo_relations_response.py | 84 + .../models/v2_set_memo_resources_response.py | 84 + .../v2_set_workspace_setting_response.py | 110 ++ memos/models/v2_setting_name_body.py | 196 ++ memos/models/v2_sign_in_response.py | 110 ++ memos/models/v2_sign_in_with_sso_response.py | 110 ++ memos/models/v2_sign_out_response.py | 84 + memos/models/v2_sign_up_response.py | 110 ++ memos/models/v2_tag.py | 136 ++ memos/models/v2_update_inbox_response.py | 110 ++ memos/models/v2_update_memo_response.py | 110 ++ memos/models/v2_update_resource_response.py | 110 ++ memos/models/v2_update_user_response.py | 110 ++ .../models/v2_update_user_setting_response.py | 110 ++ memos/models/v2_update_webhook_response.py | 110 ++ .../v2_upsert_memo_reaction_response.py | 110 ++ memos/models/v2_upsert_tag_request.py | 110 ++ memos/models/v2_upsert_tag_response.py | 110 ++ memos/models/v2_user.py | 370 ++++ memos/models/v2_user_access_token.py | 188 ++ memos/models/v2_user_name_body.py | 344 ++++ memos/models/v2_visibility.py | 92 + memos/models/v2_workspace_profile.py | 250 +++ memos/models/webhooks_webhook_id_body.py | 240 +++ memos/rest.py | 317 ++++ requirements.txt | 5 + setup.py | 39 + test-requirements.txt | 5 + test/__init__.py | 1 + test/test_activity_service_api.py | 40 + ...est_apiv2_activity_memo_comment_payload.py | 39 + test/test_apiv2_activity_payload.py | 39 + ...t_apiv2_activity_version_update_payload.py | 39 + test/test_apiv2_reaction.py | 39 + test/test_apiv2_reaction_type.py | 39 + test/test_apiv2_row_status.py | 39 + test/test_apiv2_user_setting.py | 39 + test/test_apiv2_webhook.py | 39 + test/test_apiv2_workspace_general_setting.py | 39 + test/test_apiv2_workspace_setting.py | 39 + test/test_auth_service_api.py | 68 + test/test_googlerpc_status.py | 39 + test/test_inbox_service_api.py | 54 + test/test_memo_service_api.py | 152 ++ ...st_memo_service_set_memo_relations_body.py | 39 + ...st_memo_service_set_memo_resources_body.py | 39 + test/test_memos_memo_id_body.py | 39 + test/test_protobuf_any.py | 39 + test/test_resource_service_api.py | 75 + test/test_resources_resource_id_body.py | 39 + .../test_setting_is_the_setting_to_update_.py | 39 + test/test_tag_service_api.py | 75 + test/test_user_role.py | 39 + test/test_user_service_api.py | 103 + ...r_service_create_user_access_token_body.py | 39 + test/test_v2_activity.py | 39 + test/test_v2_batch_upsert_tag_response.py | 39 + test/test_v2_create_memo_comment_response.py | 39 + test/test_v2_create_memo_request.py | 39 + test/test_v2_create_memo_response.py | 39 + test/test_v2_create_resource_response.py | 39 + ...st_v2_create_user_access_token_response.py | 39 + test/test_v2_create_user_response.py | 39 + test/test_v2_create_webhook_request.py | 39 + test/test_v2_create_webhook_response.py | 39 + test/test_v2_delete_inbox_response.py | 39 + test/test_v2_delete_memo_reaction_response.py | 39 + test/test_v2_delete_memo_response.py | 39 + test/test_v2_delete_resource_response.py | 39 + test/test_v2_delete_tag_response.py | 39 + ...st_v2_delete_user_access_token_response.py | 39 + test/test_v2_delete_user_response.py | 39 + test/test_v2_delete_webhook_response.py | 39 + test/test_v2_export_memos_response.py | 39 + test/test_v2_get_activity_response.py | 39 + test/test_v2_get_auth_status_response.py | 39 + test/test_v2_get_memo_by_name_response.py | 39 + test/test_v2_get_memo_response.py | 39 + test/test_v2_get_resource_by_name_response.py | 39 + test/test_v2_get_resource_response.py | 39 + test/test_v2_get_tag_suggestions_response.py | 39 + test/test_v2_get_user_memos_stats_response.py | 39 + test/test_v2_get_user_response.py | 39 + test/test_v2_get_user_setting_response.py | 39 + test/test_v2_get_webhook_response.py | 39 + .../test_v2_get_workspace_profile_response.py | 39 + .../test_v2_get_workspace_setting_response.py | 39 + test/test_v2_inbox.py | 39 + test/test_v2_inbox_name_body.py | 39 + test/test_v2_inbox_status.py | 39 + test/test_v2_inbox_type.py | 39 + test/test_v2_list_inboxes_response.py | 39 + test/test_v2_list_memo_comments_response.py | 39 + test/test_v2_list_memo_reactions_response.py | 39 + test/test_v2_list_memo_relations_response.py | 39 + test/test_v2_list_memo_resources_response.py | 39 + test/test_v2_list_memos_response.py | 39 + test/test_v2_list_resources_response.py | 39 + test/test_v2_list_tags_response.py | 39 + ...est_v2_list_user_access_tokens_response.py | 39 + test/test_v2_list_users_response.py | 39 + test/test_v2_list_webhooks_response.py | 39 + test/test_v2_memo.py | 39 + test/test_v2_memo_relation.py | 39 + test/test_v2_memo_relation_type.py | 39 + test/test_v2_rename_tag_response.py | 39 + test/test_v2_resource.py | 39 + test/test_v2_set_memo_relations_response.py | 39 + test/test_v2_set_memo_resources_response.py | 39 + .../test_v2_set_workspace_setting_response.py | 39 + test/test_v2_setting_name_body.py | 39 + test/test_v2_sign_in_response.py | 39 + test/test_v2_sign_in_with_sso_response.py | 39 + test/test_v2_sign_out_response.py | 39 + test/test_v2_sign_up_response.py | 39 + test/test_v2_tag.py | 39 + test/test_v2_update_inbox_response.py | 39 + test/test_v2_update_memo_response.py | 39 + test/test_v2_update_resource_response.py | 39 + test/test_v2_update_user_response.py | 39 + test/test_v2_update_user_setting_response.py | 39 + test/test_v2_update_webhook_response.py | 39 + test/test_v2_upsert_memo_reaction_response.py | 39 + test/test_v2_upsert_tag_request.py | 39 + test/test_v2_upsert_tag_response.py | 39 + test/test_v2_user.py | 39 + test/test_v2_user_access_token.py | 39 + test/test_v2_user_name_body.py | 39 + test/test_v2_visibility.py | 39 + test/test_v2_workspace_profile.py | 39 + test/test_webhook_service_api.py | 68 + test/test_webhooks_webhook_id_body.py | 39 + test/test_workspace_service_api.py | 40 + test/test_workspace_setting_service_api.py | 47 + tox.ini | 10 + 334 files changed, 28837 insertions(+), 104 deletions(-) create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 .travis.yml create mode 100644 config.json create mode 100644 docs/ActivityServiceApi.md create mode 100644 docs/Apiv2ActivityMemoCommentPayload.md create mode 100644 docs/Apiv2ActivityPayload.md create mode 100644 docs/Apiv2ActivityVersionUpdatePayload.md create mode 100644 docs/Apiv2Reaction.md create mode 100644 docs/Apiv2ReactionType.md create mode 100644 docs/Apiv2RowStatus.md create mode 100644 docs/Apiv2UserSetting.md create mode 100644 docs/Apiv2Webhook.md create mode 100644 docs/Apiv2WorkspaceGeneralSetting.md create mode 100644 docs/Apiv2WorkspaceSetting.md create mode 100644 docs/AuthServiceApi.md create mode 100644 docs/GooglerpcStatus.md create mode 100644 docs/InboxServiceApi.md create mode 100644 docs/MemoServiceApi.md create mode 100644 docs/MemoServiceSetMemoRelationsBody.md create mode 100644 docs/MemoServiceSetMemoResourcesBody.md create mode 100644 docs/MemosMemoIdBody.md create mode 100644 docs/ProtobufAny.md create mode 100644 docs/ResourceServiceApi.md create mode 100644 docs/ResourcesResourceIdBody.md create mode 100644 docs/SettingIsTheSettingToUpdate_.md create mode 100644 docs/TagServiceApi.md create mode 100644 docs/UserRole.md create mode 100644 docs/UserServiceApi.md create mode 100644 docs/UserServiceCreateUserAccessTokenBody.md create mode 100644 docs/V2Activity.md create mode 100644 docs/V2BatchUpsertTagResponse.md create mode 100644 docs/V2CreateMemoCommentResponse.md create mode 100644 docs/V2CreateMemoRequest.md create mode 100644 docs/V2CreateMemoResponse.md create mode 100644 docs/V2CreateResourceResponse.md create mode 100644 docs/V2CreateUserAccessTokenResponse.md create mode 100644 docs/V2CreateUserResponse.md create mode 100644 docs/V2CreateWebhookRequest.md create mode 100644 docs/V2CreateWebhookResponse.md create mode 100644 docs/V2DeleteInboxResponse.md create mode 100644 docs/V2DeleteMemoReactionResponse.md create mode 100644 docs/V2DeleteMemoResponse.md create mode 100644 docs/V2DeleteResourceResponse.md create mode 100644 docs/V2DeleteTagResponse.md create mode 100644 docs/V2DeleteUserAccessTokenResponse.md create mode 100644 docs/V2DeleteUserResponse.md create mode 100644 docs/V2DeleteWebhookResponse.md create mode 100644 docs/V2ExportMemosResponse.md create mode 100644 docs/V2GetActivityResponse.md create mode 100644 docs/V2GetAuthStatusResponse.md create mode 100644 docs/V2GetMemoByNameResponse.md create mode 100644 docs/V2GetMemoResponse.md create mode 100644 docs/V2GetResourceByNameResponse.md create mode 100644 docs/V2GetResourceResponse.md create mode 100644 docs/V2GetTagSuggestionsResponse.md create mode 100644 docs/V2GetUserMemosStatsResponse.md create mode 100644 docs/V2GetUserResponse.md create mode 100644 docs/V2GetUserSettingResponse.md create mode 100644 docs/V2GetWebhookResponse.md create mode 100644 docs/V2GetWorkspaceProfileResponse.md create mode 100644 docs/V2GetWorkspaceSettingResponse.md create mode 100644 docs/V2Inbox.md create mode 100644 docs/V2InboxNameBody.md create mode 100644 docs/V2InboxStatus.md create mode 100644 docs/V2InboxType.md create mode 100644 docs/V2ListInboxesResponse.md create mode 100644 docs/V2ListMemoCommentsResponse.md create mode 100644 docs/V2ListMemoReactionsResponse.md create mode 100644 docs/V2ListMemoRelationsResponse.md create mode 100644 docs/V2ListMemoResourcesResponse.md create mode 100644 docs/V2ListMemosResponse.md create mode 100644 docs/V2ListResourcesResponse.md create mode 100644 docs/V2ListTagsResponse.md create mode 100644 docs/V2ListUserAccessTokensResponse.md create mode 100644 docs/V2ListUsersResponse.md create mode 100644 docs/V2ListWebhooksResponse.md create mode 100644 docs/V2Memo.md create mode 100644 docs/V2MemoRelation.md create mode 100644 docs/V2MemoRelationType.md create mode 100644 docs/V2RenameTagResponse.md create mode 100644 docs/V2Resource.md create mode 100644 docs/V2SetMemoRelationsResponse.md create mode 100644 docs/V2SetMemoResourcesResponse.md create mode 100644 docs/V2SetWorkspaceSettingResponse.md create mode 100644 docs/V2SettingNameBody.md create mode 100644 docs/V2SignInResponse.md create mode 100644 docs/V2SignInWithSSOResponse.md create mode 100644 docs/V2SignOutResponse.md create mode 100644 docs/V2SignUpResponse.md create mode 100644 docs/V2Tag.md create mode 100644 docs/V2UpdateInboxResponse.md create mode 100644 docs/V2UpdateMemoResponse.md create mode 100644 docs/V2UpdateResourceResponse.md create mode 100644 docs/V2UpdateUserResponse.md create mode 100644 docs/V2UpdateUserSettingResponse.md create mode 100644 docs/V2UpdateWebhookResponse.md create mode 100644 docs/V2UpsertMemoReactionResponse.md create mode 100644 docs/V2UpsertTagRequest.md create mode 100644 docs/V2UpsertTagResponse.md create mode 100644 docs/V2User.md create mode 100644 docs/V2UserAccessToken.md create mode 100644 docs/V2UserNameBody.md create mode 100644 docs/V2Visibility.md create mode 100644 docs/V2WorkspaceProfile.md create mode 100644 docs/WebhookServiceApi.md create mode 100644 docs/WebhooksWebhookIdBody.md create mode 100644 docs/WorkspaceServiceApi.md create mode 100644 docs/WorkspaceSettingServiceApi.md create mode 100644 git_push.sh create mode 100644 main.py create mode 100644 memos/__init__.py create mode 100644 memos/api/__init__.py create mode 100644 memos/api/activity_service_api.py create mode 100644 memos/api/auth_service_api.py create mode 100644 memos/api/inbox_service_api.py create mode 100644 memos/api/memo_service_api.py create mode 100644 memos/api/resource_service_api.py create mode 100644 memos/api/tag_service_api.py create mode 100644 memos/api/user_service_api.py create mode 100644 memos/api/webhook_service_api.py create mode 100644 memos/api/workspace_service_api.py create mode 100644 memos/api/workspace_setting_service_api.py create mode 100644 memos/api_client.py create mode 100644 memos/configuration.py create mode 100644 memos/models/__init__.py create mode 100644 memos/models/apiv2_activity_memo_comment_payload.py create mode 100644 memos/models/apiv2_activity_payload.py create mode 100644 memos/models/apiv2_activity_version_update_payload.py create mode 100644 memos/models/apiv2_reaction.py create mode 100644 memos/models/apiv2_reaction_type.py create mode 100644 memos/models/apiv2_row_status.py create mode 100644 memos/models/apiv2_user_setting.py create mode 100644 memos/models/apiv2_webhook.py create mode 100644 memos/models/apiv2_workspace_general_setting.py create mode 100644 memos/models/apiv2_workspace_setting.py create mode 100644 memos/models/googlerpc_status.py create mode 100644 memos/models/memo_service_set_memo_relations_body.py create mode 100644 memos/models/memo_service_set_memo_resources_body.py create mode 100644 memos/models/memos_memo_id_body.py create mode 100644 memos/models/protobuf_any.py create mode 100644 memos/models/resources_resource_id_body.py create mode 100644 memos/models/setting_is_the_setting_to_update_.py create mode 100644 memos/models/user_role.py create mode 100644 memos/models/user_service_create_user_access_token_body.py create mode 100644 memos/models/v2_activity.py create mode 100644 memos/models/v2_batch_upsert_tag_response.py create mode 100644 memos/models/v2_create_memo_comment_response.py create mode 100644 memos/models/v2_create_memo_request.py create mode 100644 memos/models/v2_create_memo_response.py create mode 100644 memos/models/v2_create_resource_response.py create mode 100644 memos/models/v2_create_user_access_token_response.py create mode 100644 memos/models/v2_create_user_response.py create mode 100644 memos/models/v2_create_webhook_request.py create mode 100644 memos/models/v2_create_webhook_response.py create mode 100644 memos/models/v2_delete_inbox_response.py create mode 100644 memos/models/v2_delete_memo_reaction_response.py create mode 100644 memos/models/v2_delete_memo_response.py create mode 100644 memos/models/v2_delete_resource_response.py create mode 100644 memos/models/v2_delete_tag_response.py create mode 100644 memos/models/v2_delete_user_access_token_response.py create mode 100644 memos/models/v2_delete_user_response.py create mode 100644 memos/models/v2_delete_webhook_response.py create mode 100644 memos/models/v2_export_memos_response.py create mode 100644 memos/models/v2_get_activity_response.py create mode 100644 memos/models/v2_get_auth_status_response.py create mode 100644 memos/models/v2_get_memo_by_name_response.py create mode 100644 memos/models/v2_get_memo_response.py create mode 100644 memos/models/v2_get_resource_by_name_response.py create mode 100644 memos/models/v2_get_resource_response.py create mode 100644 memos/models/v2_get_tag_suggestions_response.py create mode 100644 memos/models/v2_get_user_memos_stats_response.py create mode 100644 memos/models/v2_get_user_response.py create mode 100644 memos/models/v2_get_user_setting_response.py create mode 100644 memos/models/v2_get_webhook_response.py create mode 100644 memos/models/v2_get_workspace_profile_response.py create mode 100644 memos/models/v2_get_workspace_setting_response.py create mode 100644 memos/models/v2_inbox.py create mode 100644 memos/models/v2_inbox_name_body.py create mode 100644 memos/models/v2_inbox_status.py create mode 100644 memos/models/v2_inbox_type.py create mode 100644 memos/models/v2_list_inboxes_response.py create mode 100644 memos/models/v2_list_memo_comments_response.py create mode 100644 memos/models/v2_list_memo_reactions_response.py create mode 100644 memos/models/v2_list_memo_relations_response.py create mode 100644 memos/models/v2_list_memo_resources_response.py create mode 100644 memos/models/v2_list_memos_response.py create mode 100644 memos/models/v2_list_resources_response.py create mode 100644 memos/models/v2_list_tags_response.py create mode 100644 memos/models/v2_list_user_access_tokens_response.py create mode 100644 memos/models/v2_list_users_response.py create mode 100644 memos/models/v2_list_webhooks_response.py create mode 100644 memos/models/v2_memo.py create mode 100644 memos/models/v2_memo_relation.py create mode 100644 memos/models/v2_memo_relation_type.py create mode 100644 memos/models/v2_rename_tag_response.py create mode 100644 memos/models/v2_resource.py create mode 100644 memos/models/v2_set_memo_relations_response.py create mode 100644 memos/models/v2_set_memo_resources_response.py create mode 100644 memos/models/v2_set_workspace_setting_response.py create mode 100644 memos/models/v2_setting_name_body.py create mode 100644 memos/models/v2_sign_in_response.py create mode 100644 memos/models/v2_sign_in_with_sso_response.py create mode 100644 memos/models/v2_sign_out_response.py create mode 100644 memos/models/v2_sign_up_response.py create mode 100644 memos/models/v2_tag.py create mode 100644 memos/models/v2_update_inbox_response.py create mode 100644 memos/models/v2_update_memo_response.py create mode 100644 memos/models/v2_update_resource_response.py create mode 100644 memos/models/v2_update_user_response.py create mode 100644 memos/models/v2_update_user_setting_response.py create mode 100644 memos/models/v2_update_webhook_response.py create mode 100644 memos/models/v2_upsert_memo_reaction_response.py create mode 100644 memos/models/v2_upsert_tag_request.py create mode 100644 memos/models/v2_upsert_tag_response.py create mode 100644 memos/models/v2_user.py create mode 100644 memos/models/v2_user_access_token.py create mode 100644 memos/models/v2_user_name_body.py create mode 100644 memos/models/v2_visibility.py create mode 100644 memos/models/v2_workspace_profile.py create mode 100644 memos/models/webhooks_webhook_id_body.py create mode 100644 memos/rest.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 test/__init__.py create mode 100644 test/test_activity_service_api.py create mode 100644 test/test_apiv2_activity_memo_comment_payload.py create mode 100644 test/test_apiv2_activity_payload.py create mode 100644 test/test_apiv2_activity_version_update_payload.py create mode 100644 test/test_apiv2_reaction.py create mode 100644 test/test_apiv2_reaction_type.py create mode 100644 test/test_apiv2_row_status.py create mode 100644 test/test_apiv2_user_setting.py create mode 100644 test/test_apiv2_webhook.py create mode 100644 test/test_apiv2_workspace_general_setting.py create mode 100644 test/test_apiv2_workspace_setting.py create mode 100644 test/test_auth_service_api.py create mode 100644 test/test_googlerpc_status.py create mode 100644 test/test_inbox_service_api.py create mode 100644 test/test_memo_service_api.py create mode 100644 test/test_memo_service_set_memo_relations_body.py create mode 100644 test/test_memo_service_set_memo_resources_body.py create mode 100644 test/test_memos_memo_id_body.py create mode 100644 test/test_protobuf_any.py create mode 100644 test/test_resource_service_api.py create mode 100644 test/test_resources_resource_id_body.py create mode 100644 test/test_setting_is_the_setting_to_update_.py create mode 100644 test/test_tag_service_api.py create mode 100644 test/test_user_role.py create mode 100644 test/test_user_service_api.py create mode 100644 test/test_user_service_create_user_access_token_body.py create mode 100644 test/test_v2_activity.py create mode 100644 test/test_v2_batch_upsert_tag_response.py create mode 100644 test/test_v2_create_memo_comment_response.py create mode 100644 test/test_v2_create_memo_request.py create mode 100644 test/test_v2_create_memo_response.py create mode 100644 test/test_v2_create_resource_response.py create mode 100644 test/test_v2_create_user_access_token_response.py create mode 100644 test/test_v2_create_user_response.py create mode 100644 test/test_v2_create_webhook_request.py create mode 100644 test/test_v2_create_webhook_response.py create mode 100644 test/test_v2_delete_inbox_response.py create mode 100644 test/test_v2_delete_memo_reaction_response.py create mode 100644 test/test_v2_delete_memo_response.py create mode 100644 test/test_v2_delete_resource_response.py create mode 100644 test/test_v2_delete_tag_response.py create mode 100644 test/test_v2_delete_user_access_token_response.py create mode 100644 test/test_v2_delete_user_response.py create mode 100644 test/test_v2_delete_webhook_response.py create mode 100644 test/test_v2_export_memos_response.py create mode 100644 test/test_v2_get_activity_response.py create mode 100644 test/test_v2_get_auth_status_response.py create mode 100644 test/test_v2_get_memo_by_name_response.py create mode 100644 test/test_v2_get_memo_response.py create mode 100644 test/test_v2_get_resource_by_name_response.py create mode 100644 test/test_v2_get_resource_response.py create mode 100644 test/test_v2_get_tag_suggestions_response.py create mode 100644 test/test_v2_get_user_memos_stats_response.py create mode 100644 test/test_v2_get_user_response.py create mode 100644 test/test_v2_get_user_setting_response.py create mode 100644 test/test_v2_get_webhook_response.py create mode 100644 test/test_v2_get_workspace_profile_response.py create mode 100644 test/test_v2_get_workspace_setting_response.py create mode 100644 test/test_v2_inbox.py create mode 100644 test/test_v2_inbox_name_body.py create mode 100644 test/test_v2_inbox_status.py create mode 100644 test/test_v2_inbox_type.py create mode 100644 test/test_v2_list_inboxes_response.py create mode 100644 test/test_v2_list_memo_comments_response.py create mode 100644 test/test_v2_list_memo_reactions_response.py create mode 100644 test/test_v2_list_memo_relations_response.py create mode 100644 test/test_v2_list_memo_resources_response.py create mode 100644 test/test_v2_list_memos_response.py create mode 100644 test/test_v2_list_resources_response.py create mode 100644 test/test_v2_list_tags_response.py create mode 100644 test/test_v2_list_user_access_tokens_response.py create mode 100644 test/test_v2_list_users_response.py create mode 100644 test/test_v2_list_webhooks_response.py create mode 100644 test/test_v2_memo.py create mode 100644 test/test_v2_memo_relation.py create mode 100644 test/test_v2_memo_relation_type.py create mode 100644 test/test_v2_rename_tag_response.py create mode 100644 test/test_v2_resource.py create mode 100644 test/test_v2_set_memo_relations_response.py create mode 100644 test/test_v2_set_memo_resources_response.py create mode 100644 test/test_v2_set_workspace_setting_response.py create mode 100644 test/test_v2_setting_name_body.py create mode 100644 test/test_v2_sign_in_response.py create mode 100644 test/test_v2_sign_in_with_sso_response.py create mode 100644 test/test_v2_sign_out_response.py create mode 100644 test/test_v2_sign_up_response.py create mode 100644 test/test_v2_tag.py create mode 100644 test/test_v2_update_inbox_response.py create mode 100644 test/test_v2_update_memo_response.py create mode 100644 test/test_v2_update_resource_response.py create mode 100644 test/test_v2_update_user_response.py create mode 100644 test/test_v2_update_user_setting_response.py create mode 100644 test/test_v2_update_webhook_response.py create mode 100644 test/test_v2_upsert_memo_reaction_response.py create mode 100644 test/test_v2_upsert_tag_request.py create mode 100644 test/test_v2_upsert_tag_response.py create mode 100644 test/test_v2_user.py create mode 100644 test/test_v2_user_access_token.py create mode 100644 test/test_v2_user_name_body.py create mode 100644 test/test_v2_visibility.py create mode 100644 test/test_v2_workspace_profile.py create mode 100644 test/test_webhook_service_api.py create mode 100644 test/test_webhooks_webhook_id_body.py create mode 100644 test/test_workspace_service_api.py create mode 100644 test/test_workspace_setting_service_api.py create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 5d381cc..a655050 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -# ---> Python # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -9,6 +8,7 @@ __pycache__/ # Distribution / packaging .Python +env/ build/ develop-eggs/ dist/ @@ -20,12 +20,9 @@ lib64/ parts/ sdist/ var/ -wheels/ -share/python-wheels/ *.egg-info/ .installed.cfg *.egg -MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -40,17 +37,15 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ -.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml -*.cover -*.py,cover +*,cover .hypothesis/ -.pytest_cache/ -cover/ +venv/ +.python-version # Translations *.mo @@ -58,105 +53,12 @@ cover/ # Django stuff: *.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy # Sphinx documentation docs/_build/ # PyBuilder -.pybuilder/ target/ -# Jupyter Notebook +#Ipython Notebook .ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..1617617 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.46 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..dd6c445 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/README.md b/README.md index 78644e1..b495dda 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,234 @@ -# memos-script +# memos-python +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: version not set +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/looching/memos-python.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/looching/memos-python.git`) + +Then import the package: +```python +import memos +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import memos +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ActivityServiceApi(memos.ApiClient(configuration)) +id = 56 # int | + +try: + # GetActivity returns the activity with the given id. + api_response = api_instance.activity_service_get_activity(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ActivityServiceApi->activity_service_get_activity: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to */* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivityServiceApi* | [**activity_service_get_activity**](docs/ActivityServiceApi.md#activity_service_get_activity) | **GET** /v2/activities/{id} | GetActivity returns the activity with the given id. +*AuthServiceApi* | [**auth_service_get_auth_status**](docs/AuthServiceApi.md#auth_service_get_auth_status) | **POST** /api/v2/auth/status | GetAuthStatus returns the current auth status of the user. +*AuthServiceApi* | [**auth_service_sign_in**](docs/AuthServiceApi.md#auth_service_sign_in) | **POST** /api/v2/auth/signin | SignIn signs in the user with the given username and password. +*AuthServiceApi* | [**auth_service_sign_in_with_sso**](docs/AuthServiceApi.md#auth_service_sign_in_with_sso) | **POST** /api/v2/auth/signin/sso | SignInWithSSO signs in the user with the given SSO code. +*AuthServiceApi* | [**auth_service_sign_out**](docs/AuthServiceApi.md#auth_service_sign_out) | **POST** /api/v2/auth/signout | SignOut signs out the user. +*AuthServiceApi* | [**auth_service_sign_up**](docs/AuthServiceApi.md#auth_service_sign_up) | **POST** /api/v2/auth/signup | SignUp signs up the user with the given username and password. +*InboxServiceApi* | [**inbox_service_delete_inbox**](docs/InboxServiceApi.md#inbox_service_delete_inbox) | **DELETE** /api/v2/{name_1} | DeleteInbox deletes an inbox. +*InboxServiceApi* | [**inbox_service_list_inboxes**](docs/InboxServiceApi.md#inbox_service_list_inboxes) | **GET** /api/v2/inboxes | ListInboxes lists inboxes for a user. +*InboxServiceApi* | [**inbox_service_update_inbox**](docs/InboxServiceApi.md#inbox_service_update_inbox) | **PATCH** /api/v2/{inbox.name} | UpdateInbox updates an inbox. +*MemoServiceApi* | [**memo_service_create_memo**](docs/MemoServiceApi.md#memo_service_create_memo) | **POST** /api/v2/memos | CreateMemo creates a memo. +*MemoServiceApi* | [**memo_service_create_memo_comment**](docs/MemoServiceApi.md#memo_service_create_memo_comment) | **POST** /api/v2/memos/{id}/comments | CreateMemoComment creates a comment for a memo. +*MemoServiceApi* | [**memo_service_delete_memo**](docs/MemoServiceApi.md#memo_service_delete_memo) | **DELETE** /api/v2/memos/{id} | DeleteMemo deletes a memo by id. +*MemoServiceApi* | [**memo_service_delete_memo_reaction**](docs/MemoServiceApi.md#memo_service_delete_memo_reaction) | **DELETE** /api/v2/memos/{id}/reactions/{reactionId} | DeleteMemoReaction deletes a reaction for a memo. +*MemoServiceApi* | [**memo_service_export_memos**](docs/MemoServiceApi.md#memo_service_export_memos) | **POST** /api/v2/memos:export | ExportMemos exports memos. +*MemoServiceApi* | [**memo_service_get_memo**](docs/MemoServiceApi.md#memo_service_get_memo) | **GET** /api/v2/memos/{id} | GetMemo gets a memo by id. +*MemoServiceApi* | [**memo_service_get_memo_by_name**](docs/MemoServiceApi.md#memo_service_get_memo_by_name) | **GET** /api/v2/memos/name/{name} | GetMemoByName gets a memo by name. +*MemoServiceApi* | [**memo_service_get_user_memos_stats**](docs/MemoServiceApi.md#memo_service_get_user_memos_stats) | **GET** /api/v2/memos/stats | GetUserMemosStats gets stats of memos for a user. +*MemoServiceApi* | [**memo_service_list_memo_comments**](docs/MemoServiceApi.md#memo_service_list_memo_comments) | **GET** /api/v2/memos/{id}/comments | ListMemoComments lists comments for a memo. +*MemoServiceApi* | [**memo_service_list_memo_reactions**](docs/MemoServiceApi.md#memo_service_list_memo_reactions) | **GET** /api/v2/memos/{id}/reactions | ListMemoReactions lists reactions for a memo. +*MemoServiceApi* | [**memo_service_list_memo_relations**](docs/MemoServiceApi.md#memo_service_list_memo_relations) | **GET** /api/v2/memos/{id}/relations | ListMemoRelations lists relations for a memo. +*MemoServiceApi* | [**memo_service_list_memo_resources**](docs/MemoServiceApi.md#memo_service_list_memo_resources) | **GET** /api/v2/memos/{id}/resources | ListMemoResources lists resources for a memo. +*MemoServiceApi* | [**memo_service_list_memos**](docs/MemoServiceApi.md#memo_service_list_memos) | **GET** /api/v2/memos | ListMemos lists memos with pagination and filter. +*MemoServiceApi* | [**memo_service_set_memo_relations**](docs/MemoServiceApi.md#memo_service_set_memo_relations) | **POST** /api/v2/memos/{id}/relations | SetMemoRelations sets relations for a memo. +*MemoServiceApi* | [**memo_service_set_memo_resources**](docs/MemoServiceApi.md#memo_service_set_memo_resources) | **POST** /api/v2/memos/{id}/resources | SetMemoResources sets resources for a memo. +*MemoServiceApi* | [**memo_service_update_memo**](docs/MemoServiceApi.md#memo_service_update_memo) | **PATCH** /api/v2/memos/{memo.id} | UpdateMemo updates a memo. +*MemoServiceApi* | [**memo_service_upsert_memo_reaction**](docs/MemoServiceApi.md#memo_service_upsert_memo_reaction) | **POST** /api/v2/memos/{id}/reactions | UpsertMemoReaction upserts a reaction for a memo. +*ResourceServiceApi* | [**resource_service_create_resource**](docs/ResourceServiceApi.md#resource_service_create_resource) | **POST** /api/v2/resources | CreateResource creates a new resource. +*ResourceServiceApi* | [**resource_service_delete_resource**](docs/ResourceServiceApi.md#resource_service_delete_resource) | **DELETE** /api/v2/resources/{id} | DeleteResource deletes a resource by id. +*ResourceServiceApi* | [**resource_service_get_resource**](docs/ResourceServiceApi.md#resource_service_get_resource) | **GET** /api/v2/resources/{id} | GetResource returns a resource by id. +*ResourceServiceApi* | [**resource_service_get_resource_by_name**](docs/ResourceServiceApi.md#resource_service_get_resource_by_name) | **GET** /api/v2/resources/name/{name} | GetResourceByName returns a resource by name. +*ResourceServiceApi* | [**resource_service_list_resources**](docs/ResourceServiceApi.md#resource_service_list_resources) | **GET** /api/v2/resources | ListResources lists all resources. +*ResourceServiceApi* | [**resource_service_update_resource**](docs/ResourceServiceApi.md#resource_service_update_resource) | **PATCH** /api/v2/resources/{resource.id} | UpdateResource updates a resource. +*TagServiceApi* | [**tag_service_batch_upsert_tag**](docs/TagServiceApi.md#tag_service_batch_upsert_tag) | **POST** /api/v2/tags:batchUpsert | BatchUpsertTag upserts multiple tags. +*TagServiceApi* | [**tag_service_delete_tag**](docs/TagServiceApi.md#tag_service_delete_tag) | **DELETE** /api/v2/tags | DeleteTag deletes a tag. +*TagServiceApi* | [**tag_service_get_tag_suggestions**](docs/TagServiceApi.md#tag_service_get_tag_suggestions) | **GET** /api/v2/tags/suggestion | GetTagSuggestions gets tag suggestions from the user's memos. +*TagServiceApi* | [**tag_service_list_tags**](docs/TagServiceApi.md#tag_service_list_tags) | **GET** /api/v2/tags | ListTags lists tags. +*TagServiceApi* | [**tag_service_rename_tag**](docs/TagServiceApi.md#tag_service_rename_tag) | **PATCH** /api/v2/tags:rename | RenameTag renames a tag. All related memos will be updated. +*TagServiceApi* | [**tag_service_upsert_tag**](docs/TagServiceApi.md#tag_service_upsert_tag) | **POST** /api/v2/tags | UpsertTag upserts a tag. +*UserServiceApi* | [**user_service_create_user**](docs/UserServiceApi.md#user_service_create_user) | **POST** /api/v2/users | CreateUser creates a new user. +*UserServiceApi* | [**user_service_create_user_access_token**](docs/UserServiceApi.md#user_service_create_user_access_token) | **POST** /api/v2/{name}/access_tokens | CreateUserAccessToken creates a new access token for a user. +*UserServiceApi* | [**user_service_delete_user**](docs/UserServiceApi.md#user_service_delete_user) | **DELETE** /api/v2/{name} | DeleteUser deletes a user. +*UserServiceApi* | [**user_service_delete_user_access_token**](docs/UserServiceApi.md#user_service_delete_user_access_token) | **DELETE** /api/v2/{name}/access_tokens/{accessToken} | DeleteUserAccessToken deletes an access token for a user. +*UserServiceApi* | [**user_service_get_user**](docs/UserServiceApi.md#user_service_get_user) | **GET** /api/v2/{name} | GetUser gets a user by name. +*UserServiceApi* | [**user_service_get_user_setting**](docs/UserServiceApi.md#user_service_get_user_setting) | **GET** /api/v2/{name}/setting | GetUserSetting gets the setting of a user. +*UserServiceApi* | [**user_service_list_user_access_tokens**](docs/UserServiceApi.md#user_service_list_user_access_tokens) | **GET** /api/v2/{name}/access_tokens | ListUserAccessTokens returns a list of access tokens for a user. +*UserServiceApi* | [**user_service_list_users**](docs/UserServiceApi.md#user_service_list_users) | **GET** /api/v2/users | ListUsers returns a list of users. +*UserServiceApi* | [**user_service_update_user**](docs/UserServiceApi.md#user_service_update_user) | **PATCH** /api/v2/{user.name} | UpdateUser updates a user. +*UserServiceApi* | [**user_service_update_user_setting**](docs/UserServiceApi.md#user_service_update_user_setting) | **PATCH** /api/v2/{setting.name} | UpdateUserSetting updates the setting of a user. +*WebhookServiceApi* | [**webhook_service_create_webhook**](docs/WebhookServiceApi.md#webhook_service_create_webhook) | **POST** /api/v2/webhooks | CreateWebhook creates a new webhook. +*WebhookServiceApi* | [**webhook_service_delete_webhook**](docs/WebhookServiceApi.md#webhook_service_delete_webhook) | **DELETE** /api/v2/webhooks/{id} | DeleteWebhook deletes a webhook by id. +*WebhookServiceApi* | [**webhook_service_get_webhook**](docs/WebhookServiceApi.md#webhook_service_get_webhook) | **GET** /api/v2/webhooks/{id} | GetWebhook returns a webhook by id. +*WebhookServiceApi* | [**webhook_service_list_webhooks**](docs/WebhookServiceApi.md#webhook_service_list_webhooks) | **GET** /api/v2/webhooks | ListWebhooks returns a list of webhooks. +*WebhookServiceApi* | [**webhook_service_update_webhook**](docs/WebhookServiceApi.md#webhook_service_update_webhook) | **PATCH** /api/v2/webhooks/{webhook.id} | UpdateWebhook updates a webhook. +*WorkspaceServiceApi* | [**workspace_service_get_workspace_profile**](docs/WorkspaceServiceApi.md#workspace_service_get_workspace_profile) | **GET** /api/v2/workspace/profile | GetWorkspaceProfile returns the workspace profile. +*WorkspaceSettingServiceApi* | [**workspace_setting_service_get_workspace_setting**](docs/WorkspaceSettingServiceApi.md#workspace_setting_service_get_workspace_setting) | **GET** /api/v2/workspace/{name} | GetWorkspaceSetting returns the setting by name. +*WorkspaceSettingServiceApi* | [**workspace_setting_service_set_workspace_setting**](docs/WorkspaceSettingServiceApi.md#workspace_setting_service_set_workspace_setting) | **PATCH** /api/v2/workspace/{setting.name} | SetWorkspaceSetting updates the setting. + +## Documentation For Models + + - [Apiv2ActivityMemoCommentPayload](docs/Apiv2ActivityMemoCommentPayload.md) + - [Apiv2ActivityPayload](docs/Apiv2ActivityPayload.md) + - [Apiv2ActivityVersionUpdatePayload](docs/Apiv2ActivityVersionUpdatePayload.md) + - [Apiv2Reaction](docs/Apiv2Reaction.md) + - [Apiv2ReactionType](docs/Apiv2ReactionType.md) + - [Apiv2RowStatus](docs/Apiv2RowStatus.md) + - [Apiv2UserSetting](docs/Apiv2UserSetting.md) + - [Apiv2Webhook](docs/Apiv2Webhook.md) + - [Apiv2WorkspaceGeneralSetting](docs/Apiv2WorkspaceGeneralSetting.md) + - [Apiv2WorkspaceSetting](docs/Apiv2WorkspaceSetting.md) + - [GooglerpcStatus](docs/GooglerpcStatus.md) + - [MemoServiceSetMemoRelationsBody](docs/MemoServiceSetMemoRelationsBody.md) + - [MemoServiceSetMemoResourcesBody](docs/MemoServiceSetMemoResourcesBody.md) + - [MemosMemoIdBody](docs/MemosMemoIdBody.md) + - [ProtobufAny](docs/ProtobufAny.md) + - [ResourcesResourceIdBody](docs/ResourcesResourceIdBody.md) + - [SettingIsTheSettingToUpdate_](docs/SettingIsTheSettingToUpdate_.md) + - [UserRole](docs/UserRole.md) + - [UserServiceCreateUserAccessTokenBody](docs/UserServiceCreateUserAccessTokenBody.md) + - [V2Activity](docs/V2Activity.md) + - [V2BatchUpsertTagResponse](docs/V2BatchUpsertTagResponse.md) + - [V2CreateMemoCommentResponse](docs/V2CreateMemoCommentResponse.md) + - [V2CreateMemoRequest](docs/V2CreateMemoRequest.md) + - [V2CreateMemoResponse](docs/V2CreateMemoResponse.md) + - [V2CreateResourceResponse](docs/V2CreateResourceResponse.md) + - [V2CreateUserAccessTokenResponse](docs/V2CreateUserAccessTokenResponse.md) + - [V2CreateUserResponse](docs/V2CreateUserResponse.md) + - [V2CreateWebhookRequest](docs/V2CreateWebhookRequest.md) + - [V2CreateWebhookResponse](docs/V2CreateWebhookResponse.md) + - [V2DeleteInboxResponse](docs/V2DeleteInboxResponse.md) + - [V2DeleteMemoReactionResponse](docs/V2DeleteMemoReactionResponse.md) + - [V2DeleteMemoResponse](docs/V2DeleteMemoResponse.md) + - [V2DeleteResourceResponse](docs/V2DeleteResourceResponse.md) + - [V2DeleteTagResponse](docs/V2DeleteTagResponse.md) + - [V2DeleteUserAccessTokenResponse](docs/V2DeleteUserAccessTokenResponse.md) + - [V2DeleteUserResponse](docs/V2DeleteUserResponse.md) + - [V2DeleteWebhookResponse](docs/V2DeleteWebhookResponse.md) + - [V2ExportMemosResponse](docs/V2ExportMemosResponse.md) + - [V2GetActivityResponse](docs/V2GetActivityResponse.md) + - [V2GetAuthStatusResponse](docs/V2GetAuthStatusResponse.md) + - [V2GetMemoByNameResponse](docs/V2GetMemoByNameResponse.md) + - [V2GetMemoResponse](docs/V2GetMemoResponse.md) + - [V2GetResourceByNameResponse](docs/V2GetResourceByNameResponse.md) + - [V2GetResourceResponse](docs/V2GetResourceResponse.md) + - [V2GetTagSuggestionsResponse](docs/V2GetTagSuggestionsResponse.md) + - [V2GetUserMemosStatsResponse](docs/V2GetUserMemosStatsResponse.md) + - [V2GetUserResponse](docs/V2GetUserResponse.md) + - [V2GetUserSettingResponse](docs/V2GetUserSettingResponse.md) + - [V2GetWebhookResponse](docs/V2GetWebhookResponse.md) + - [V2GetWorkspaceProfileResponse](docs/V2GetWorkspaceProfileResponse.md) + - [V2GetWorkspaceSettingResponse](docs/V2GetWorkspaceSettingResponse.md) + - [V2Inbox](docs/V2Inbox.md) + - [V2InboxNameBody](docs/V2InboxNameBody.md) + - [V2InboxStatus](docs/V2InboxStatus.md) + - [V2InboxType](docs/V2InboxType.md) + - [V2ListInboxesResponse](docs/V2ListInboxesResponse.md) + - [V2ListMemoCommentsResponse](docs/V2ListMemoCommentsResponse.md) + - [V2ListMemoReactionsResponse](docs/V2ListMemoReactionsResponse.md) + - [V2ListMemoRelationsResponse](docs/V2ListMemoRelationsResponse.md) + - [V2ListMemoResourcesResponse](docs/V2ListMemoResourcesResponse.md) + - [V2ListMemosResponse](docs/V2ListMemosResponse.md) + - [V2ListResourcesResponse](docs/V2ListResourcesResponse.md) + - [V2ListTagsResponse](docs/V2ListTagsResponse.md) + - [V2ListUserAccessTokensResponse](docs/V2ListUserAccessTokensResponse.md) + - [V2ListUsersResponse](docs/V2ListUsersResponse.md) + - [V2ListWebhooksResponse](docs/V2ListWebhooksResponse.md) + - [V2Memo](docs/V2Memo.md) + - [V2MemoRelation](docs/V2MemoRelation.md) + - [V2MemoRelationType](docs/V2MemoRelationType.md) + - [V2RenameTagResponse](docs/V2RenameTagResponse.md) + - [V2Resource](docs/V2Resource.md) + - [V2SetMemoRelationsResponse](docs/V2SetMemoRelationsResponse.md) + - [V2SetMemoResourcesResponse](docs/V2SetMemoResourcesResponse.md) + - [V2SetWorkspaceSettingResponse](docs/V2SetWorkspaceSettingResponse.md) + - [V2SettingNameBody](docs/V2SettingNameBody.md) + - [V2SignInResponse](docs/V2SignInResponse.md) + - [V2SignInWithSSOResponse](docs/V2SignInWithSSOResponse.md) + - [V2SignOutResponse](docs/V2SignOutResponse.md) + - [V2SignUpResponse](docs/V2SignUpResponse.md) + - [V2Tag](docs/V2Tag.md) + - [V2UpdateInboxResponse](docs/V2UpdateInboxResponse.md) + - [V2UpdateMemoResponse](docs/V2UpdateMemoResponse.md) + - [V2UpdateResourceResponse](docs/V2UpdateResourceResponse.md) + - [V2UpdateUserResponse](docs/V2UpdateUserResponse.md) + - [V2UpdateUserSettingResponse](docs/V2UpdateUserSettingResponse.md) + - [V2UpdateWebhookResponse](docs/V2UpdateWebhookResponse.md) + - [V2UpsertMemoReactionResponse](docs/V2UpsertMemoReactionResponse.md) + - [V2UpsertTagRequest](docs/V2UpsertTagRequest.md) + - [V2UpsertTagResponse](docs/V2UpsertTagResponse.md) + - [V2User](docs/V2User.md) + - [V2UserAccessToken](docs/V2UserAccessToken.md) + - [V2UserNameBody](docs/V2UserNameBody.md) + - [V2Visibility](docs/V2Visibility.md) + - [V2WorkspaceProfile](docs/V2WorkspaceProfile.md) + - [WebhooksWebhookIdBody](docs/WebhooksWebhookIdBody.md) + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + diff --git a/config.json b/config.json new file mode 100644 index 0000000..8a47453 --- /dev/null +++ b/config.json @@ -0,0 +1,6 @@ +{ + "packageName": "memos", + "projectName": "memos-python", + "packageVersion": "1.0.0", + "packageUrl": "https://github.com/looching/memos-python" +} diff --git a/docs/ActivityServiceApi.md b/docs/ActivityServiceApi.md new file mode 100644 index 0000000..cf16c1d --- /dev/null +++ b/docs/ActivityServiceApi.md @@ -0,0 +1,54 @@ +# memos.ActivityServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activity_service_get_activity**](ActivityServiceApi.md#activity_service_get_activity) | **GET** /v2/activities/{id} | GetActivity returns the activity with the given id. + +# **activity_service_get_activity** +> V2GetActivityResponse activity_service_get_activity(id) + +GetActivity returns the activity with the given id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ActivityServiceApi() +id = 56 # int | + +try: + # GetActivity returns the activity with the given id. + api_response = api_instance.activity_service_get_activity(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ActivityServiceApi->activity_service_get_activity: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2GetActivityResponse**](V2GetActivityResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Apiv2ActivityMemoCommentPayload.md b/docs/Apiv2ActivityMemoCommentPayload.md new file mode 100644 index 0000000..49b319f --- /dev/null +++ b/docs/Apiv2ActivityMemoCommentPayload.md @@ -0,0 +1,10 @@ +# Apiv2ActivityMemoCommentPayload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo_id** | **int** | | [optional] +**related_memo_id** | **int** | | [optional] + +[[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/docs/Apiv2ActivityPayload.md b/docs/Apiv2ActivityPayload.md new file mode 100644 index 0000000..17154fc --- /dev/null +++ b/docs/Apiv2ActivityPayload.md @@ -0,0 +1,10 @@ +# Apiv2ActivityPayload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo_comment** | [**Apiv2ActivityMemoCommentPayload**](Apiv2ActivityMemoCommentPayload.md) | | [optional] +**version_update** | [**Apiv2ActivityVersionUpdatePayload**](Apiv2ActivityVersionUpdatePayload.md) | | [optional] + +[[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/docs/Apiv2ActivityVersionUpdatePayload.md b/docs/Apiv2ActivityVersionUpdatePayload.md new file mode 100644 index 0000000..63d9218 --- /dev/null +++ b/docs/Apiv2ActivityVersionUpdatePayload.md @@ -0,0 +1,9 @@ +# Apiv2ActivityVersionUpdatePayload + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] + +[[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/docs/Apiv2Reaction.md b/docs/Apiv2Reaction.md new file mode 100644 index 0000000..88de368 --- /dev/null +++ b/docs/Apiv2Reaction.md @@ -0,0 +1,12 @@ +# Apiv2Reaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**creator** | **str** | | [optional] +**content_id** | **str** | | [optional] +**reaction_type** | [**Apiv2ReactionType**](Apiv2ReactionType.md) | | [optional] + +[[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/docs/Apiv2ReactionType.md b/docs/Apiv2ReactionType.md new file mode 100644 index 0000000..f5bfe11 --- /dev/null +++ b/docs/Apiv2ReactionType.md @@ -0,0 +1,8 @@ +# Apiv2ReactionType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Apiv2RowStatus.md b/docs/Apiv2RowStatus.md new file mode 100644 index 0000000..972aa54 --- /dev/null +++ b/docs/Apiv2RowStatus.md @@ -0,0 +1,8 @@ +# Apiv2RowStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Apiv2UserSetting.md b/docs/Apiv2UserSetting.md new file mode 100644 index 0000000..be83a94 --- /dev/null +++ b/docs/Apiv2UserSetting.md @@ -0,0 +1,13 @@ +# Apiv2UserSetting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**locale** | **str** | The preferred locale of the user. | [optional] +**appearance** | **str** | The preferred appearance of the user. | [optional] +**memo_visibility** | **str** | The default visibility of the memo. | [optional] +**telegram_user_id** | **str** | The telegram user id of the user. | [optional] + +[[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/docs/Apiv2Webhook.md b/docs/Apiv2Webhook.md new file mode 100644 index 0000000..a1fc002 --- /dev/null +++ b/docs/Apiv2Webhook.md @@ -0,0 +1,15 @@ +# Apiv2Webhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**creator_id** | **int** | | [optional] +**created_time** | **datetime** | | [optional] +**updated_time** | **datetime** | | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**name** | **str** | | [optional] +**url** | **str** | | [optional] + +[[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/docs/Apiv2WorkspaceGeneralSetting.md b/docs/Apiv2WorkspaceGeneralSetting.md new file mode 100644 index 0000000..05465b3 --- /dev/null +++ b/docs/Apiv2WorkspaceGeneralSetting.md @@ -0,0 +1,13 @@ +# Apiv2WorkspaceGeneralSetting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_url** | **str** | instance_url is the instance URL. | [optional] +**disallow_signup** | **bool** | disallow_signup is the flag to disallow signup. | [optional] +**disallow_password_login** | **bool** | disallow_password_login is the flag to disallow password login. | [optional] +**additional_script** | **str** | additional_script is the additional script. | [optional] +**additional_style** | **str** | additional_style is the additional style. | [optional] + +[[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/docs/Apiv2WorkspaceSetting.md b/docs/Apiv2WorkspaceSetting.md new file mode 100644 index 0000000..d6a91c7 --- /dev/null +++ b/docs/Apiv2WorkspaceSetting.md @@ -0,0 +1,10 @@ +# Apiv2WorkspaceSetting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**general_setting** | [**Apiv2WorkspaceGeneralSetting**](Apiv2WorkspaceGeneralSetting.md) | | [optional] + +[[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/docs/AuthServiceApi.md b/docs/AuthServiceApi.md new file mode 100644 index 0000000..7221a3e --- /dev/null +++ b/docs/AuthServiceApi.md @@ -0,0 +1,244 @@ +# memos.AuthServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**auth_service_get_auth_status**](AuthServiceApi.md#auth_service_get_auth_status) | **POST** /api/v2/auth/status | GetAuthStatus returns the current auth status of the user. +[**auth_service_sign_in**](AuthServiceApi.md#auth_service_sign_in) | **POST** /api/v2/auth/signin | SignIn signs in the user with the given username and password. +[**auth_service_sign_in_with_sso**](AuthServiceApi.md#auth_service_sign_in_with_sso) | **POST** /api/v2/auth/signin/sso | SignInWithSSO signs in the user with the given SSO code. +[**auth_service_sign_out**](AuthServiceApi.md#auth_service_sign_out) | **POST** /api/v2/auth/signout | SignOut signs out the user. +[**auth_service_sign_up**](AuthServiceApi.md#auth_service_sign_up) | **POST** /api/v2/auth/signup | SignUp signs up the user with the given username and password. + +# **auth_service_get_auth_status** +> V2GetAuthStatusResponse auth_service_get_auth_status() + +GetAuthStatus returns the current auth status of the user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.AuthServiceApi() + +try: + # GetAuthStatus returns the current auth status of the user. + api_response = api_instance.auth_service_get_auth_status() + pprint(api_response) +except ApiException as e: + print("Exception when calling AuthServiceApi->auth_service_get_auth_status: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2GetAuthStatusResponse**](V2GetAuthStatusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_service_sign_in** +> V2SignInResponse auth_service_sign_in(username=username, password=password, never_expire=never_expire) + +SignIn signs in the user with the given username and password. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.AuthServiceApi() +username = 'username_example' # str | (optional) +password = 'password_example' # str | (optional) +never_expire = true # bool | (optional) + +try: + # SignIn signs in the user with the given username and password. + api_response = api_instance.auth_service_sign_in(username=username, password=password, never_expire=never_expire) + pprint(api_response) +except ApiException as e: + print("Exception when calling AuthServiceApi->auth_service_sign_in: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| | [optional] + **password** | **str**| | [optional] + **never_expire** | **bool**| | [optional] + +### Return type + +[**V2SignInResponse**](V2SignInResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_service_sign_in_with_sso** +> V2SignInWithSSOResponse auth_service_sign_in_with_sso(idp_id=idp_id, code=code, redirect_uri=redirect_uri) + +SignInWithSSO signs in the user with the given SSO code. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.AuthServiceApi() +idp_id = 56 # int | (optional) +code = 'code_example' # str | (optional) +redirect_uri = 'redirect_uri_example' # str | (optional) + +try: + # SignInWithSSO signs in the user with the given SSO code. + api_response = api_instance.auth_service_sign_in_with_sso(idp_id=idp_id, code=code, redirect_uri=redirect_uri) + pprint(api_response) +except ApiException as e: + print("Exception when calling AuthServiceApi->auth_service_sign_in_with_sso: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **idp_id** | **int**| | [optional] + **code** | **str**| | [optional] + **redirect_uri** | **str**| | [optional] + +### Return type + +[**V2SignInWithSSOResponse**](V2SignInWithSSOResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_service_sign_out** +> V2SignOutResponse auth_service_sign_out() + +SignOut signs out the user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.AuthServiceApi() + +try: + # SignOut signs out the user. + api_response = api_instance.auth_service_sign_out() + pprint(api_response) +except ApiException as e: + print("Exception when calling AuthServiceApi->auth_service_sign_out: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2SignOutResponse**](V2SignOutResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_service_sign_up** +> V2SignUpResponse auth_service_sign_up(username=username, password=password) + +SignUp signs up the user with the given username and password. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.AuthServiceApi() +username = 'username_example' # str | (optional) +password = 'password_example' # str | (optional) + +try: + # SignUp signs up the user with the given username and password. + api_response = api_instance.auth_service_sign_up(username=username, password=password) + pprint(api_response) +except ApiException as e: + print("Exception when calling AuthServiceApi->auth_service_sign_up: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| | [optional] + **password** | **str**| | [optional] + +### Return type + +[**V2SignUpResponse**](V2SignUpResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GooglerpcStatus.md b/docs/GooglerpcStatus.md new file mode 100644 index 0000000..304c886 --- /dev/null +++ b/docs/GooglerpcStatus.md @@ -0,0 +1,11 @@ +# GooglerpcStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**details** | [**list[ProtobufAny]**](ProtobufAny.md) | | [optional] + +[[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/docs/InboxServiceApi.md b/docs/InboxServiceApi.md new file mode 100644 index 0000000..1de33a9 --- /dev/null +++ b/docs/InboxServiceApi.md @@ -0,0 +1,150 @@ +# memos.InboxServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**inbox_service_delete_inbox**](InboxServiceApi.md#inbox_service_delete_inbox) | **DELETE** /api/v2/{name_1} | DeleteInbox deletes an inbox. +[**inbox_service_list_inboxes**](InboxServiceApi.md#inbox_service_list_inboxes) | **GET** /api/v2/inboxes | ListInboxes lists inboxes for a user. +[**inbox_service_update_inbox**](InboxServiceApi.md#inbox_service_update_inbox) | **PATCH** /api/v2/{inbox.name} | UpdateInbox updates an inbox. + +# **inbox_service_delete_inbox** +> V2DeleteInboxResponse inbox_service_delete_inbox(name_1) + +DeleteInbox deletes an inbox. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.InboxServiceApi() +name_1 = 'name_1_example' # str | The name of the inbox to delete. Format: inboxes/{uid} + +try: + # DeleteInbox deletes an inbox. + api_response = api_instance.inbox_service_delete_inbox(name_1) + pprint(api_response) +except ApiException as e: + print("Exception when calling InboxServiceApi->inbox_service_delete_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name_1** | **str**| The name of the inbox to delete. Format: inboxes/{uid} | + +### Return type + +[**V2DeleteInboxResponse**](V2DeleteInboxResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **inbox_service_list_inboxes** +> V2ListInboxesResponse inbox_service_list_inboxes(user=user) + +ListInboxes lists inboxes for a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.InboxServiceApi() +user = 'user_example' # str | Format: users/{username} (optional) + +try: + # ListInboxes lists inboxes for a user. + api_response = api_instance.inbox_service_list_inboxes(user=user) + pprint(api_response) +except ApiException as e: + print("Exception when calling InboxServiceApi->inbox_service_list_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Format: users/{username} | [optional] + +### Return type + +[**V2ListInboxesResponse**](V2ListInboxesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **inbox_service_update_inbox** +> V2UpdateInboxResponse inbox_service_update_inbox(body, inbox_name) + +UpdateInbox updates an inbox. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.InboxServiceApi() +body = memos.V2InboxNameBody() # V2InboxNameBody | +inbox_name = 'inbox_name_example' # str | The name of the inbox. Format: inboxes/{uid} + +try: + # UpdateInbox updates an inbox. + api_response = api_instance.inbox_service_update_inbox(body, inbox_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling InboxServiceApi->inbox_service_update_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2InboxNameBody**](V2InboxNameBody.md)| | + **inbox_name** | **str**| The name of the inbox. Format: inboxes/{uid} | + +### Return type + +[**V2UpdateInboxResponse**](V2UpdateInboxResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MemoServiceApi.md b/docs/MemoServiceApi.md new file mode 100644 index 0000000..c483baa --- /dev/null +++ b/docs/MemoServiceApi.md @@ -0,0 +1,834 @@ +# memos.MemoServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**memo_service_create_memo**](MemoServiceApi.md#memo_service_create_memo) | **POST** /api/v2/memos | CreateMemo creates a memo. +[**memo_service_create_memo_comment**](MemoServiceApi.md#memo_service_create_memo_comment) | **POST** /api/v2/memos/{id}/comments | CreateMemoComment creates a comment for a memo. +[**memo_service_delete_memo**](MemoServiceApi.md#memo_service_delete_memo) | **DELETE** /api/v2/memos/{id} | DeleteMemo deletes a memo by id. +[**memo_service_delete_memo_reaction**](MemoServiceApi.md#memo_service_delete_memo_reaction) | **DELETE** /api/v2/memos/{id}/reactions/{reactionId} | DeleteMemoReaction deletes a reaction for a memo. +[**memo_service_export_memos**](MemoServiceApi.md#memo_service_export_memos) | **POST** /api/v2/memos:export | ExportMemos exports memos. +[**memo_service_get_memo**](MemoServiceApi.md#memo_service_get_memo) | **GET** /api/v2/memos/{id} | GetMemo gets a memo by id. +[**memo_service_get_memo_by_name**](MemoServiceApi.md#memo_service_get_memo_by_name) | **GET** /api/v2/memos/name/{name} | GetMemoByName gets a memo by name. +[**memo_service_get_user_memos_stats**](MemoServiceApi.md#memo_service_get_user_memos_stats) | **GET** /api/v2/memos/stats | GetUserMemosStats gets stats of memos for a user. +[**memo_service_list_memo_comments**](MemoServiceApi.md#memo_service_list_memo_comments) | **GET** /api/v2/memos/{id}/comments | ListMemoComments lists comments for a memo. +[**memo_service_list_memo_reactions**](MemoServiceApi.md#memo_service_list_memo_reactions) | **GET** /api/v2/memos/{id}/reactions | ListMemoReactions lists reactions for a memo. +[**memo_service_list_memo_relations**](MemoServiceApi.md#memo_service_list_memo_relations) | **GET** /api/v2/memos/{id}/relations | ListMemoRelations lists relations for a memo. +[**memo_service_list_memo_resources**](MemoServiceApi.md#memo_service_list_memo_resources) | **GET** /api/v2/memos/{id}/resources | ListMemoResources lists resources for a memo. +[**memo_service_list_memos**](MemoServiceApi.md#memo_service_list_memos) | **GET** /api/v2/memos | ListMemos lists memos with pagination and filter. +[**memo_service_set_memo_relations**](MemoServiceApi.md#memo_service_set_memo_relations) | **POST** /api/v2/memos/{id}/relations | SetMemoRelations sets relations for a memo. +[**memo_service_set_memo_resources**](MemoServiceApi.md#memo_service_set_memo_resources) | **POST** /api/v2/memos/{id}/resources | SetMemoResources sets resources for a memo. +[**memo_service_update_memo**](MemoServiceApi.md#memo_service_update_memo) | **PATCH** /api/v2/memos/{memo.id} | UpdateMemo updates a memo. +[**memo_service_upsert_memo_reaction**](MemoServiceApi.md#memo_service_upsert_memo_reaction) | **POST** /api/v2/memos/{id}/reactions | UpsertMemoReaction upserts a reaction for a memo. + +# **memo_service_create_memo** +> V2CreateMemoResponse memo_service_create_memo(body) + +CreateMemo creates a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +body = memos.V2CreateMemoRequest() # V2CreateMemoRequest | + +try: + # CreateMemo creates a memo. + api_response = api_instance.memo_service_create_memo(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_create_memo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2CreateMemoRequest**](V2CreateMemoRequest.md)| | + +### Return type + +[**V2CreateMemoResponse**](V2CreateMemoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_create_memo_comment** +> V2CreateMemoCommentResponse memo_service_create_memo_comment(id, create_content=create_content, create_visibility=create_visibility) + +CreateMemoComment creates a comment for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | id is the memo id to create comment for. +create_content = 'create_content_example' # str | (optional) +create_visibility = 'VISIBILITY_UNSPECIFIED' # str | (optional) (default to VISIBILITY_UNSPECIFIED) + +try: + # CreateMemoComment creates a comment for a memo. + api_response = api_instance.memo_service_create_memo_comment(id, create_content=create_content, create_visibility=create_visibility) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_create_memo_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id is the memo id to create comment for. | + **create_content** | **str**| | [optional] + **create_visibility** | **str**| | [optional] [default to VISIBILITY_UNSPECIFIED] + +### Return type + +[**V2CreateMemoCommentResponse**](V2CreateMemoCommentResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_delete_memo** +> V2DeleteMemoResponse memo_service_delete_memo(id) + +DeleteMemo deletes a memo by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # DeleteMemo deletes a memo by id. + api_response = api_instance.memo_service_delete_memo(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_delete_memo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2DeleteMemoResponse**](V2DeleteMemoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_delete_memo_reaction** +> V2DeleteMemoReactionResponse memo_service_delete_memo_reaction(id, reaction_id) + +DeleteMemoReaction deletes a reaction for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | +reaction_id = 56 # int | + +try: + # DeleteMemoReaction deletes a reaction for a memo. + api_response = api_instance.memo_service_delete_memo_reaction(id, reaction_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_delete_memo_reaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **reaction_id** | **int**| | + +### Return type + +[**V2DeleteMemoReactionResponse**](V2DeleteMemoReactionResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_export_memos** +> V2ExportMemosResponse memo_service_export_memos(filter=filter) + +ExportMemos exports memos. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +filter = 'filter_example' # str | Same as ListMemosRequest.filter (optional) + +try: + # ExportMemos exports memos. + api_response = api_instance.memo_service_export_memos(filter=filter) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_export_memos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **str**| Same as ListMemosRequest.filter | [optional] + +### Return type + +[**V2ExportMemosResponse**](V2ExportMemosResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_get_memo** +> V2GetMemoResponse memo_service_get_memo(id) + +GetMemo gets a memo by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # GetMemo gets a memo by id. + api_response = api_instance.memo_service_get_memo(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_get_memo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2GetMemoResponse**](V2GetMemoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_get_memo_by_name** +> V2GetMemoByNameResponse memo_service_get_memo_by_name(name) + +GetMemoByName gets a memo by name. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +name = 'name_example' # str | + +try: + # GetMemoByName gets a memo by name. + api_response = api_instance.memo_service_get_memo_by_name(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_get_memo_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + +### Return type + +[**V2GetMemoByNameResponse**](V2GetMemoByNameResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_get_user_memos_stats** +> V2GetUserMemosStatsResponse memo_service_get_user_memos_stats(name=name, timezone=timezone, filter=filter) + +GetUserMemosStats gets stats of memos for a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +name = 'name_example' # str | name is the name of the user to get stats for. Format: users/{username} (optional) +timezone = 'timezone_example' # str | timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones (optional) +filter = 'filter_example' # str | Same as ListMemosRequest.filter (optional) + +try: + # GetUserMemosStats gets stats of memos for a user. + api_response = api_instance.memo_service_get_user_memos_stats(name=name, timezone=timezone, filter=filter) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_get_user_memos_stats: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| name is the name of the user to get stats for. Format: users/{username} | [optional] + **timezone** | **str**| timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | [optional] + **filter** | **str**| Same as ListMemosRequest.filter | [optional] + +### Return type + +[**V2GetUserMemosStatsResponse**](V2GetUserMemosStatsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_list_memo_comments** +> V2ListMemoCommentsResponse memo_service_list_memo_comments(id) + +ListMemoComments lists comments for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # ListMemoComments lists comments for a memo. + api_response = api_instance.memo_service_list_memo_comments(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_list_memo_comments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2ListMemoCommentsResponse**](V2ListMemoCommentsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_list_memo_reactions** +> V2ListMemoReactionsResponse memo_service_list_memo_reactions(id) + +ListMemoReactions lists reactions for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # ListMemoReactions lists reactions for a memo. + api_response = api_instance.memo_service_list_memo_reactions(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_list_memo_reactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2ListMemoReactionsResponse**](V2ListMemoReactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_list_memo_relations** +> V2ListMemoRelationsResponse memo_service_list_memo_relations(id) + +ListMemoRelations lists relations for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # ListMemoRelations lists relations for a memo. + api_response = api_instance.memo_service_list_memo_relations(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_list_memo_relations: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2ListMemoRelationsResponse**](V2ListMemoRelationsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_list_memo_resources** +> V2ListMemoResourcesResponse memo_service_list_memo_resources(id) + +ListMemoResources lists resources for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | + +try: + # ListMemoResources lists resources for a memo. + api_response = api_instance.memo_service_list_memo_resources(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_list_memo_resources: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2ListMemoResourcesResponse**](V2ListMemoResourcesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_list_memos** +> V2ListMemosResponse memo_service_list_memos(page_size=page_size, page_token=page_token, filter=filter) + +ListMemos lists memos with pagination and filter. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +page_size = 56 # int | The maximum number of memos to return. (optional) +page_token = 'page_token_example' # str | A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page. (optional) +filter = 'filter_example' # str | Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\" (optional) + +try: + # ListMemos lists memos with pagination and filter. + api_response = api_instance.memo_service_list_memos(page_size=page_size, page_token=page_token, filter=filter) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_list_memos: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_size** | **int**| The maximum number of memos to return. | [optional] + **page_token** | **str**| A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page. | [optional] + **filter** | **str**| Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\" | [optional] + +### Return type + +[**V2ListMemosResponse**](V2ListMemosResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_set_memo_relations** +> V2SetMemoRelationsResponse memo_service_set_memo_relations(body, id) + +SetMemoRelations sets relations for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +body = memos.MemoServiceSetMemoRelationsBody() # MemoServiceSetMemoRelationsBody | +id = 56 # int | + +try: + # SetMemoRelations sets relations for a memo. + api_response = api_instance.memo_service_set_memo_relations(body, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_set_memo_relations: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MemoServiceSetMemoRelationsBody**](MemoServiceSetMemoRelationsBody.md)| | + **id** | **int**| | + +### Return type + +[**V2SetMemoRelationsResponse**](V2SetMemoRelationsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_set_memo_resources** +> V2SetMemoResourcesResponse memo_service_set_memo_resources(body, id) + +SetMemoResources sets resources for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +body = memos.MemoServiceSetMemoResourcesBody() # MemoServiceSetMemoResourcesBody | +id = 56 # int | + +try: + # SetMemoResources sets resources for a memo. + api_response = api_instance.memo_service_set_memo_resources(body, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_set_memo_resources: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MemoServiceSetMemoResourcesBody**](MemoServiceSetMemoResourcesBody.md)| | + **id** | **int**| | + +### Return type + +[**V2SetMemoResourcesResponse**](V2SetMemoResourcesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_update_memo** +> V2UpdateMemoResponse memo_service_update_memo(body, memo_id) + +UpdateMemo updates a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +body = memos.MemosMemoIdBody() # MemosMemoIdBody | +memo_id = 56 # int | id is the system generated unique identifier. + +try: + # UpdateMemo updates a memo. + api_response = api_instance.memo_service_update_memo(body, memo_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_update_memo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MemosMemoIdBody**](MemosMemoIdBody.md)| | + **memo_id** | **int**| id is the system generated unique identifier. | + +### Return type + +[**V2UpdateMemoResponse**](V2UpdateMemoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **memo_service_upsert_memo_reaction** +> V2UpsertMemoReactionResponse memo_service_upsert_memo_reaction(id, reaction_id=reaction_id, reaction_creator=reaction_creator, reaction_content_id=reaction_content_id, reaction_reaction_type=reaction_reaction_type) + +UpsertMemoReaction upserts a reaction for a memo. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.MemoServiceApi() +id = 56 # int | +reaction_id = 56 # int | (optional) +reaction_creator = 'reaction_creator_example' # str | (optional) +reaction_content_id = 'reaction_content_id_example' # str | (optional) +reaction_reaction_type = 'TYPE_UNSPECIFIED' # str | (optional) (default to TYPE_UNSPECIFIED) + +try: + # UpsertMemoReaction upserts a reaction for a memo. + api_response = api_instance.memo_service_upsert_memo_reaction(id, reaction_id=reaction_id, reaction_creator=reaction_creator, reaction_content_id=reaction_content_id, reaction_reaction_type=reaction_reaction_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling MemoServiceApi->memo_service_upsert_memo_reaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **reaction_id** | **int**| | [optional] + **reaction_creator** | **str**| | [optional] + **reaction_content_id** | **str**| | [optional] + **reaction_reaction_type** | **str**| | [optional] [default to TYPE_UNSPECIFIED] + +### Return type + +[**V2UpsertMemoReactionResponse**](V2UpsertMemoReactionResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MemoServiceSetMemoRelationsBody.md b/docs/MemoServiceSetMemoRelationsBody.md new file mode 100644 index 0000000..f6c8de3 --- /dev/null +++ b/docs/MemoServiceSetMemoRelationsBody.md @@ -0,0 +1,9 @@ +# MemoServiceSetMemoRelationsBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**relations** | [**list[V2MemoRelation]**](V2MemoRelation.md) | | [optional] + +[[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/docs/MemoServiceSetMemoResourcesBody.md b/docs/MemoServiceSetMemoResourcesBody.md new file mode 100644 index 0000000..387ce8e --- /dev/null +++ b/docs/MemoServiceSetMemoResourcesBody.md @@ -0,0 +1,9 @@ +# MemoServiceSetMemoResourcesBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**list[V2Resource]**](V2Resource.md) | | [optional] + +[[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/docs/MemosMemoIdBody.md b/docs/MemosMemoIdBody.md new file mode 100644 index 0000000..b756350 --- /dev/null +++ b/docs/MemosMemoIdBody.md @@ -0,0 +1,22 @@ +# MemosMemoIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | name is the user provided name. | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**creator** | **str** | | [optional] +**creator_id** | **int** | | [optional] +**create_time** | **datetime** | | [optional] +**update_time** | **datetime** | | [optional] +**display_time** | **datetime** | | [optional] +**content** | **str** | | [optional] +**visibility** | [**V2Visibility**](V2Visibility.md) | | [optional] +**pinned** | **bool** | | [optional] +**parent_id** | **int** | | [optional] +**resources** | [**list[V2Resource]**](V2Resource.md) | | [optional] +**relations** | [**list[V2MemoRelation]**](V2MemoRelation.md) | | [optional] +**reactions** | [**list[Apiv2Reaction]**](Apiv2Reaction.md) | | [optional] + +[[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/docs/ProtobufAny.md b/docs/ProtobufAny.md new file mode 100644 index 0000000..5694f04 --- /dev/null +++ b/docs/ProtobufAny.md @@ -0,0 +1,8 @@ +# ProtobufAny + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/ResourceServiceApi.md b/docs/ResourceServiceApi.md new file mode 100644 index 0000000..f84b45e --- /dev/null +++ b/docs/ResourceServiceApi.md @@ -0,0 +1,293 @@ +# memos.ResourceServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**resource_service_create_resource**](ResourceServiceApi.md#resource_service_create_resource) | **POST** /api/v2/resources | CreateResource creates a new resource. +[**resource_service_delete_resource**](ResourceServiceApi.md#resource_service_delete_resource) | **DELETE** /api/v2/resources/{id} | DeleteResource deletes a resource by id. +[**resource_service_get_resource**](ResourceServiceApi.md#resource_service_get_resource) | **GET** /api/v2/resources/{id} | GetResource returns a resource by id. +[**resource_service_get_resource_by_name**](ResourceServiceApi.md#resource_service_get_resource_by_name) | **GET** /api/v2/resources/name/{name} | GetResourceByName returns a resource by name. +[**resource_service_list_resources**](ResourceServiceApi.md#resource_service_list_resources) | **GET** /api/v2/resources | ListResources lists all resources. +[**resource_service_update_resource**](ResourceServiceApi.md#resource_service_update_resource) | **PATCH** /api/v2/resources/{resource.id} | UpdateResource updates a resource. + +# **resource_service_create_resource** +> V2CreateResourceResponse resource_service_create_resource(filename=filename, external_link=external_link, type=type, memo_id=memo_id) + +CreateResource creates a new resource. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() +filename = 'filename_example' # str | (optional) +external_link = 'external_link_example' # str | (optional) +type = 'type_example' # str | (optional) +memo_id = 56 # int | (optional) + +try: + # CreateResource creates a new resource. + api_response = api_instance.resource_service_create_resource(filename=filename, external_link=external_link, type=type, memo_id=memo_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_create_resource: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filename** | **str**| | [optional] + **external_link** | **str**| | [optional] + **type** | **str**| | [optional] + **memo_id** | **int**| | [optional] + +### Return type + +[**V2CreateResourceResponse**](V2CreateResourceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resource_service_delete_resource** +> V2DeleteResourceResponse resource_service_delete_resource(id) + +DeleteResource deletes a resource by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() +id = 56 # int | + +try: + # DeleteResource deletes a resource by id. + api_response = api_instance.resource_service_delete_resource(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_delete_resource: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2DeleteResourceResponse**](V2DeleteResourceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resource_service_get_resource** +> V2GetResourceResponse resource_service_get_resource(id) + +GetResource returns a resource by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() +id = 56 # int | + +try: + # GetResource returns a resource by id. + api_response = api_instance.resource_service_get_resource(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_get_resource: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2GetResourceResponse**](V2GetResourceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resource_service_get_resource_by_name** +> V2GetResourceByNameResponse resource_service_get_resource_by_name(name) + +GetResourceByName returns a resource by name. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() +name = 'name_example' # str | + +try: + # GetResourceByName returns a resource by name. + api_response = api_instance.resource_service_get_resource_by_name(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_get_resource_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + +### Return type + +[**V2GetResourceByNameResponse**](V2GetResourceByNameResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resource_service_list_resources** +> V2ListResourcesResponse resource_service_list_resources() + +ListResources lists all resources. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() + +try: + # ListResources lists all resources. + api_response = api_instance.resource_service_list_resources() + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_list_resources: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2ListResourcesResponse**](V2ListResourcesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **resource_service_update_resource** +> V2UpdateResourceResponse resource_service_update_resource(body, resource_id) + +UpdateResource updates a resource. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.ResourceServiceApi() +body = memos.ResourcesResourceIdBody() # ResourcesResourceIdBody | +resource_id = 56 # int | id is the system generated unique identifier. + +try: + # UpdateResource updates a resource. + api_response = api_instance.resource_service_update_resource(body, resource_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ResourceServiceApi->resource_service_update_resource: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResourcesResourceIdBody**](ResourcesResourceIdBody.md)| | + **resource_id** | **int**| id is the system generated unique identifier. | + +### Return type + +[**V2UpdateResourceResponse**](V2UpdateResourceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ResourcesResourceIdBody.md b/docs/ResourcesResourceIdBody.md new file mode 100644 index 0000000..d417a3b --- /dev/null +++ b/docs/ResourcesResourceIdBody.md @@ -0,0 +1,15 @@ +# ResourcesResourceIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | name is the user provided name. | [optional] +**create_time** | **datetime** | | [optional] +**filename** | **str** | | [optional] +**external_link** | **str** | | [optional] +**type** | **str** | | [optional] +**size** | **str** | | [optional] +**memo_id** | **int** | | [optional] + +[[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/docs/SettingIsTheSettingToUpdate_.md b/docs/SettingIsTheSettingToUpdate_.md new file mode 100644 index 0000000..91e7721 --- /dev/null +++ b/docs/SettingIsTheSettingToUpdate_.md @@ -0,0 +1,9 @@ +# SettingIsTheSettingToUpdate_ + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**general_setting** | [**Apiv2WorkspaceGeneralSetting**](Apiv2WorkspaceGeneralSetting.md) | | [optional] + +[[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/docs/TagServiceApi.md b/docs/TagServiceApi.md new file mode 100644 index 0000000..37d6989 --- /dev/null +++ b/docs/TagServiceApi.md @@ -0,0 +1,291 @@ +# memos.TagServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tag_service_batch_upsert_tag**](TagServiceApi.md#tag_service_batch_upsert_tag) | **POST** /api/v2/tags:batchUpsert | BatchUpsertTag upserts multiple tags. +[**tag_service_delete_tag**](TagServiceApi.md#tag_service_delete_tag) | **DELETE** /api/v2/tags | DeleteTag deletes a tag. +[**tag_service_get_tag_suggestions**](TagServiceApi.md#tag_service_get_tag_suggestions) | **GET** /api/v2/tags/suggestion | GetTagSuggestions gets tag suggestions from the user's memos. +[**tag_service_list_tags**](TagServiceApi.md#tag_service_list_tags) | **GET** /api/v2/tags | ListTags lists tags. +[**tag_service_rename_tag**](TagServiceApi.md#tag_service_rename_tag) | **PATCH** /api/v2/tags:rename | RenameTag renames a tag. All related memos will be updated. +[**tag_service_upsert_tag**](TagServiceApi.md#tag_service_upsert_tag) | **POST** /api/v2/tags | UpsertTag upserts a tag. + +# **tag_service_batch_upsert_tag** +> V2BatchUpsertTagResponse tag_service_batch_upsert_tag() + +BatchUpsertTag upserts multiple tags. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() + +try: + # BatchUpsertTag upserts multiple tags. + api_response = api_instance.tag_service_batch_upsert_tag() + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_batch_upsert_tag: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2BatchUpsertTagResponse**](V2BatchUpsertTagResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **tag_service_delete_tag** +> V2DeleteTagResponse tag_service_delete_tag(tag_name=tag_name, tag_creator=tag_creator) + +DeleteTag deletes a tag. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() +tag_name = 'tag_name_example' # str | (optional) +tag_creator = 'tag_creator_example' # str | The creator of tags. Format: users/{username} (optional) + +try: + # DeleteTag deletes a tag. + api_response = api_instance.tag_service_delete_tag(tag_name=tag_name, tag_creator=tag_creator) + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_delete_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag_name** | **str**| | [optional] + **tag_creator** | **str**| The creator of tags. Format: users/{username} | [optional] + +### Return type + +[**V2DeleteTagResponse**](V2DeleteTagResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **tag_service_get_tag_suggestions** +> V2GetTagSuggestionsResponse tag_service_get_tag_suggestions(user=user) + +GetTagSuggestions gets tag suggestions from the user's memos. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() +user = 'user_example' # str | The creator of tags. Format: users/{username} (optional) + +try: + # GetTagSuggestions gets tag suggestions from the user's memos. + api_response = api_instance.tag_service_get_tag_suggestions(user=user) + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_get_tag_suggestions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| The creator of tags. Format: users/{username} | [optional] + +### Return type + +[**V2GetTagSuggestionsResponse**](V2GetTagSuggestionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **tag_service_list_tags** +> V2ListTagsResponse tag_service_list_tags(user=user) + +ListTags lists tags. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() +user = 'user_example' # str | The creator of tags. Format: users/{username} (optional) + +try: + # ListTags lists tags. + api_response = api_instance.tag_service_list_tags(user=user) + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_list_tags: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| The creator of tags. Format: users/{username} | [optional] + +### Return type + +[**V2ListTagsResponse**](V2ListTagsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **tag_service_rename_tag** +> V2RenameTagResponse tag_service_rename_tag(user=user, old_name=old_name, new_name=new_name) + +RenameTag renames a tag. All related memos will be updated. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() +user = 'user_example' # str | The creator of tags. Format: users/{username} (optional) +old_name = 'old_name_example' # str | (optional) +new_name = 'new_name_example' # str | (optional) + +try: + # RenameTag renames a tag. All related memos will be updated. + api_response = api_instance.tag_service_rename_tag(user=user, old_name=old_name, new_name=new_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_rename_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| The creator of tags. Format: users/{username} | [optional] + **old_name** | **str**| | [optional] + **new_name** | **str**| | [optional] + +### Return type + +[**V2RenameTagResponse**](V2RenameTagResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **tag_service_upsert_tag** +> V2UpsertTagResponse tag_service_upsert_tag(name=name) + +UpsertTag upserts a tag. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.TagServiceApi() +name = 'name_example' # str | (optional) + +try: + # UpsertTag upserts a tag. + api_response = api_instance.tag_service_upsert_tag(name=name) + pprint(api_response) +except ApiException as e: + print("Exception when calling TagServiceApi->tag_service_upsert_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | [optional] + +### Return type + +[**V2UpsertTagResponse**](V2UpsertTagResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UserRole.md b/docs/UserRole.md new file mode 100644 index 0000000..f324774 --- /dev/null +++ b/docs/UserRole.md @@ -0,0 +1,8 @@ +# UserRole + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UserServiceApi.md b/docs/UserServiceApi.md new file mode 100644 index 0000000..b220dc2 --- /dev/null +++ b/docs/UserServiceApi.md @@ -0,0 +1,481 @@ +# memos.UserServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**user_service_create_user**](UserServiceApi.md#user_service_create_user) | **POST** /api/v2/users | CreateUser creates a new user. +[**user_service_create_user_access_token**](UserServiceApi.md#user_service_create_user_access_token) | **POST** /api/v2/{name}/access_tokens | CreateUserAccessToken creates a new access token for a user. +[**user_service_delete_user**](UserServiceApi.md#user_service_delete_user) | **DELETE** /api/v2/{name} | DeleteUser deletes a user. +[**user_service_delete_user_access_token**](UserServiceApi.md#user_service_delete_user_access_token) | **DELETE** /api/v2/{name}/access_tokens/{accessToken} | DeleteUserAccessToken deletes an access token for a user. +[**user_service_get_user**](UserServiceApi.md#user_service_get_user) | **GET** /api/v2/{name} | GetUser gets a user by name. +[**user_service_get_user_setting**](UserServiceApi.md#user_service_get_user_setting) | **GET** /api/v2/{name}/setting | GetUserSetting gets the setting of a user. +[**user_service_list_user_access_tokens**](UserServiceApi.md#user_service_list_user_access_tokens) | **GET** /api/v2/{name}/access_tokens | ListUserAccessTokens returns a list of access tokens for a user. +[**user_service_list_users**](UserServiceApi.md#user_service_list_users) | **GET** /api/v2/users | ListUsers returns a list of users. +[**user_service_update_user**](UserServiceApi.md#user_service_update_user) | **PATCH** /api/v2/{user.name} | UpdateUser updates a user. +[**user_service_update_user_setting**](UserServiceApi.md#user_service_update_user_setting) | **PATCH** /api/v2/{setting.name} | UpdateUserSetting updates the setting of a user. + +# **user_service_create_user** +> V2CreateUserResponse user_service_create_user(body) + +CreateUser creates a new user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +body = memos.V2User() # V2User | + +try: + # CreateUser creates a new user. + api_response = api_instance.user_service_create_user(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_create_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2User**](V2User.md)| | + +### Return type + +[**V2CreateUserResponse**](V2CreateUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_create_user_access_token** +> V2CreateUserAccessTokenResponse user_service_create_user_access_token(body, name) + +CreateUserAccessToken creates a new access token for a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +body = memos.UserServiceCreateUserAccessTokenBody() # UserServiceCreateUserAccessTokenBody | +name = 'name_example' # str | The name of the user. Format: users/{username} + +try: + # CreateUserAccessToken creates a new access token for a user. + api_response = api_instance.user_service_create_user_access_token(body, name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_create_user_access_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UserServiceCreateUserAccessTokenBody**](UserServiceCreateUserAccessTokenBody.md)| | + **name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2CreateUserAccessTokenResponse**](V2CreateUserAccessTokenResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_delete_user** +> V2DeleteUserResponse user_service_delete_user(name) + +DeleteUser deletes a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +name = 'name_example' # str | The name of the user. Format: users/{username} + +try: + # DeleteUser deletes a user. + api_response = api_instance.user_service_delete_user(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_delete_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2DeleteUserResponse**](V2DeleteUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_delete_user_access_token** +> V2DeleteUserAccessTokenResponse user_service_delete_user_access_token(name, access_token) + +DeleteUserAccessToken deletes an access token for a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +name = 'name_example' # str | The name of the user. Format: users/{username} +access_token = 'access_token_example' # str | access_token is the access token to delete. + +try: + # DeleteUserAccessToken deletes an access token for a user. + api_response = api_instance.user_service_delete_user_access_token(name, access_token) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_delete_user_access_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the user. Format: users/{username} | + **access_token** | **str**| access_token is the access token to delete. | + +### Return type + +[**V2DeleteUserAccessTokenResponse**](V2DeleteUserAccessTokenResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_get_user** +> V2GetUserResponse user_service_get_user(name) + +GetUser gets a user by name. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +name = 'name_example' # str | The name of the user. Format: users/{username} + +try: + # GetUser gets a user by name. + api_response = api_instance.user_service_get_user(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_get_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2GetUserResponse**](V2GetUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_get_user_setting** +> V2GetUserSettingResponse user_service_get_user_setting(name) + +GetUserSetting gets the setting of a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +name = 'name_example' # str | The name of the user. Format: users/{username} + +try: + # GetUserSetting gets the setting of a user. + api_response = api_instance.user_service_get_user_setting(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_get_user_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2GetUserSettingResponse**](V2GetUserSettingResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_list_user_access_tokens** +> V2ListUserAccessTokensResponse user_service_list_user_access_tokens(name) + +ListUserAccessTokens returns a list of access tokens for a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +name = 'name_example' # str | The name of the user. Format: users/{username} + +try: + # ListUserAccessTokens returns a list of access tokens for a user. + api_response = api_instance.user_service_list_user_access_tokens(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_list_user_access_tokens: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2ListUserAccessTokensResponse**](V2ListUserAccessTokensResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_list_users** +> V2ListUsersResponse user_service_list_users() + +ListUsers returns a list of users. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() + +try: + # ListUsers returns a list of users. + api_response = api_instance.user_service_list_users() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_list_users: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2ListUsersResponse**](V2ListUsersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_update_user** +> V2UpdateUserResponse user_service_update_user(body, user_name) + +UpdateUser updates a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +body = memos.V2UserNameBody() # V2UserNameBody | +user_name = 'user_name_example' # str | The name of the user. Format: users/{username} + +try: + # UpdateUser updates a user. + api_response = api_instance.user_service_update_user(body, user_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_update_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2UserNameBody**](V2UserNameBody.md)| | + **user_name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2UpdateUserResponse**](V2UpdateUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_service_update_user_setting** +> V2UpdateUserSettingResponse user_service_update_user_setting(body, setting_name) + +UpdateUserSetting updates the setting of a user. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.UserServiceApi() +body = memos.V2SettingNameBody() # V2SettingNameBody | +setting_name = 'setting_name_example' # str | The name of the user. Format: users/{username} + +try: + # UpdateUserSetting updates the setting of a user. + api_response = api_instance.user_service_update_user_setting(body, setting_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserServiceApi->user_service_update_user_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2SettingNameBody**](V2SettingNameBody.md)| | + **setting_name** | **str**| The name of the user. Format: users/{username} | + +### Return type + +[**V2UpdateUserSettingResponse**](V2UpdateUserSettingResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UserServiceCreateUserAccessTokenBody.md b/docs/UserServiceCreateUserAccessTokenBody.md new file mode 100644 index 0000000..e57b117 --- /dev/null +++ b/docs/UserServiceCreateUserAccessTokenBody.md @@ -0,0 +1,10 @@ +# UserServiceCreateUserAccessTokenBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**expires_at** | **datetime** | | [optional] + +[[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/docs/V2Activity.md b/docs/V2Activity.md new file mode 100644 index 0000000..746495a --- /dev/null +++ b/docs/V2Activity.md @@ -0,0 +1,14 @@ +# V2Activity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**creator_id** | **int** | | [optional] +**type** | **str** | | [optional] +**level** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**payload** | [**Apiv2ActivityPayload**](Apiv2ActivityPayload.md) | | [optional] + +[[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/docs/V2BatchUpsertTagResponse.md b/docs/V2BatchUpsertTagResponse.md new file mode 100644 index 0000000..4bad364 --- /dev/null +++ b/docs/V2BatchUpsertTagResponse.md @@ -0,0 +1,8 @@ +# V2BatchUpsertTagResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2CreateMemoCommentResponse.md b/docs/V2CreateMemoCommentResponse.md new file mode 100644 index 0000000..611f6bb --- /dev/null +++ b/docs/V2CreateMemoCommentResponse.md @@ -0,0 +1,9 @@ +# V2CreateMemoCommentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo** | [**V2Memo**](V2Memo.md) | | [optional] + +[[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/docs/V2CreateMemoRequest.md b/docs/V2CreateMemoRequest.md new file mode 100644 index 0000000..9e9af5e --- /dev/null +++ b/docs/V2CreateMemoRequest.md @@ -0,0 +1,10 @@ +# V2CreateMemoRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**visibility** | [**V2Visibility**](V2Visibility.md) | | [optional] + +[[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/docs/V2CreateMemoResponse.md b/docs/V2CreateMemoResponse.md new file mode 100644 index 0000000..7649c89 --- /dev/null +++ b/docs/V2CreateMemoResponse.md @@ -0,0 +1,9 @@ +# V2CreateMemoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo** | [**V2Memo**](V2Memo.md) | | [optional] + +[[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/docs/V2CreateResourceResponse.md b/docs/V2CreateResourceResponse.md new file mode 100644 index 0000000..abf859a --- /dev/null +++ b/docs/V2CreateResourceResponse.md @@ -0,0 +1,9 @@ +# V2CreateResourceResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | [**V2Resource**](V2Resource.md) | | [optional] + +[[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/docs/V2CreateUserAccessTokenResponse.md b/docs/V2CreateUserAccessTokenResponse.md new file mode 100644 index 0000000..e9dab35 --- /dev/null +++ b/docs/V2CreateUserAccessTokenResponse.md @@ -0,0 +1,9 @@ +# V2CreateUserAccessTokenResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | [**V2UserAccessToken**](V2UserAccessToken.md) | | [optional] + +[[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/docs/V2CreateUserResponse.md b/docs/V2CreateUserResponse.md new file mode 100644 index 0000000..56b7544 --- /dev/null +++ b/docs/V2CreateUserResponse.md @@ -0,0 +1,9 @@ +# V2CreateUserResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2CreateWebhookRequest.md b/docs/V2CreateWebhookRequest.md new file mode 100644 index 0000000..0ac3526 --- /dev/null +++ b/docs/V2CreateWebhookRequest.md @@ -0,0 +1,10 @@ +# V2CreateWebhookRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**url** | **str** | | [optional] + +[[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/docs/V2CreateWebhookResponse.md b/docs/V2CreateWebhookResponse.md new file mode 100644 index 0000000..028e15a --- /dev/null +++ b/docs/V2CreateWebhookResponse.md @@ -0,0 +1,9 @@ +# V2CreateWebhookResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook** | [**Apiv2Webhook**](Apiv2Webhook.md) | | [optional] + +[[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/docs/V2DeleteInboxResponse.md b/docs/V2DeleteInboxResponse.md new file mode 100644 index 0000000..a7112b9 --- /dev/null +++ b/docs/V2DeleteInboxResponse.md @@ -0,0 +1,8 @@ +# V2DeleteInboxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteMemoReactionResponse.md b/docs/V2DeleteMemoReactionResponse.md new file mode 100644 index 0000000..96976c1 --- /dev/null +++ b/docs/V2DeleteMemoReactionResponse.md @@ -0,0 +1,8 @@ +# V2DeleteMemoReactionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteMemoResponse.md b/docs/V2DeleteMemoResponse.md new file mode 100644 index 0000000..3a7400b --- /dev/null +++ b/docs/V2DeleteMemoResponse.md @@ -0,0 +1,8 @@ +# V2DeleteMemoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteResourceResponse.md b/docs/V2DeleteResourceResponse.md new file mode 100644 index 0000000..7936724 --- /dev/null +++ b/docs/V2DeleteResourceResponse.md @@ -0,0 +1,8 @@ +# V2DeleteResourceResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteTagResponse.md b/docs/V2DeleteTagResponse.md new file mode 100644 index 0000000..0473317 --- /dev/null +++ b/docs/V2DeleteTagResponse.md @@ -0,0 +1,8 @@ +# V2DeleteTagResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteUserAccessTokenResponse.md b/docs/V2DeleteUserAccessTokenResponse.md new file mode 100644 index 0000000..5cf2e63 --- /dev/null +++ b/docs/V2DeleteUserAccessTokenResponse.md @@ -0,0 +1,8 @@ +# V2DeleteUserAccessTokenResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteUserResponse.md b/docs/V2DeleteUserResponse.md new file mode 100644 index 0000000..4375264 --- /dev/null +++ b/docs/V2DeleteUserResponse.md @@ -0,0 +1,8 @@ +# V2DeleteUserResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2DeleteWebhookResponse.md b/docs/V2DeleteWebhookResponse.md new file mode 100644 index 0000000..eaf52f7 --- /dev/null +++ b/docs/V2DeleteWebhookResponse.md @@ -0,0 +1,8 @@ +# V2DeleteWebhookResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2ExportMemosResponse.md b/docs/V2ExportMemosResponse.md new file mode 100644 index 0000000..907a094 --- /dev/null +++ b/docs/V2ExportMemosResponse.md @@ -0,0 +1,9 @@ +# V2ExportMemosResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] + +[[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/docs/V2GetActivityResponse.md b/docs/V2GetActivityResponse.md new file mode 100644 index 0000000..69548d9 --- /dev/null +++ b/docs/V2GetActivityResponse.md @@ -0,0 +1,9 @@ +# V2GetActivityResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activity** | [**V2Activity**](V2Activity.md) | | [optional] + +[[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/docs/V2GetAuthStatusResponse.md b/docs/V2GetAuthStatusResponse.md new file mode 100644 index 0000000..68f1d12 --- /dev/null +++ b/docs/V2GetAuthStatusResponse.md @@ -0,0 +1,9 @@ +# V2GetAuthStatusResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2GetMemoByNameResponse.md b/docs/V2GetMemoByNameResponse.md new file mode 100644 index 0000000..11d856b --- /dev/null +++ b/docs/V2GetMemoByNameResponse.md @@ -0,0 +1,9 @@ +# V2GetMemoByNameResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo** | [**V2Memo**](V2Memo.md) | | [optional] + +[[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/docs/V2GetMemoResponse.md b/docs/V2GetMemoResponse.md new file mode 100644 index 0000000..8f2ecb4 --- /dev/null +++ b/docs/V2GetMemoResponse.md @@ -0,0 +1,9 @@ +# V2GetMemoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo** | [**V2Memo**](V2Memo.md) | | [optional] + +[[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/docs/V2GetResourceByNameResponse.md b/docs/V2GetResourceByNameResponse.md new file mode 100644 index 0000000..7047266 --- /dev/null +++ b/docs/V2GetResourceByNameResponse.md @@ -0,0 +1,9 @@ +# V2GetResourceByNameResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | [**V2Resource**](V2Resource.md) | | [optional] + +[[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/docs/V2GetResourceResponse.md b/docs/V2GetResourceResponse.md new file mode 100644 index 0000000..a0bb3e1 --- /dev/null +++ b/docs/V2GetResourceResponse.md @@ -0,0 +1,9 @@ +# V2GetResourceResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | [**V2Resource**](V2Resource.md) | | [optional] + +[[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/docs/V2GetTagSuggestionsResponse.md b/docs/V2GetTagSuggestionsResponse.md new file mode 100644 index 0000000..f5faa69 --- /dev/null +++ b/docs/V2GetTagSuggestionsResponse.md @@ -0,0 +1,9 @@ +# V2GetTagSuggestionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **list[str]** | | [optional] + +[[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/docs/V2GetUserMemosStatsResponse.md b/docs/V2GetUserMemosStatsResponse.md new file mode 100644 index 0000000..44bb163 --- /dev/null +++ b/docs/V2GetUserMemosStatsResponse.md @@ -0,0 +1,9 @@ +# V2GetUserMemosStatsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stats** | **dict(str, int)** | stats is the stats of memo creating/updating activities. key is the year-month-day string. e.g. \"2020-01-01\". | [optional] + +[[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/docs/V2GetUserResponse.md b/docs/V2GetUserResponse.md new file mode 100644 index 0000000..9ac1179 --- /dev/null +++ b/docs/V2GetUserResponse.md @@ -0,0 +1,9 @@ +# V2GetUserResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2GetUserSettingResponse.md b/docs/V2GetUserSettingResponse.md new file mode 100644 index 0000000..39ea088 --- /dev/null +++ b/docs/V2GetUserSettingResponse.md @@ -0,0 +1,9 @@ +# V2GetUserSettingResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**setting** | [**Apiv2UserSetting**](Apiv2UserSetting.md) | | [optional] + +[[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/docs/V2GetWebhookResponse.md b/docs/V2GetWebhookResponse.md new file mode 100644 index 0000000..63ae4f3 --- /dev/null +++ b/docs/V2GetWebhookResponse.md @@ -0,0 +1,9 @@ +# V2GetWebhookResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook** | [**Apiv2Webhook**](Apiv2Webhook.md) | | [optional] + +[[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/docs/V2GetWorkspaceProfileResponse.md b/docs/V2GetWorkspaceProfileResponse.md new file mode 100644 index 0000000..df8ff4e --- /dev/null +++ b/docs/V2GetWorkspaceProfileResponse.md @@ -0,0 +1,9 @@ +# V2GetWorkspaceProfileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_profile** | [**V2WorkspaceProfile**](V2WorkspaceProfile.md) | | [optional] + +[[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/docs/V2GetWorkspaceSettingResponse.md b/docs/V2GetWorkspaceSettingResponse.md new file mode 100644 index 0000000..625ecc5 --- /dev/null +++ b/docs/V2GetWorkspaceSettingResponse.md @@ -0,0 +1,9 @@ +# V2GetWorkspaceSettingResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**setting** | [**Apiv2WorkspaceSetting**](Apiv2WorkspaceSetting.md) | | [optional] + +[[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/docs/V2Inbox.md b/docs/V2Inbox.md new file mode 100644 index 0000000..a850cb2 --- /dev/null +++ b/docs/V2Inbox.md @@ -0,0 +1,15 @@ +# V2Inbox + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**sender** | **str** | | [optional] +**receiver** | **str** | | [optional] +**status** | [**V2InboxStatus**](V2InboxStatus.md) | | [optional] +**create_time** | **datetime** | | [optional] +**type** | [**V2InboxType**](V2InboxType.md) | | [optional] +**activity_id** | **int** | | [optional] + +[[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/docs/V2InboxNameBody.md b/docs/V2InboxNameBody.md new file mode 100644 index 0000000..410eeea --- /dev/null +++ b/docs/V2InboxNameBody.md @@ -0,0 +1,14 @@ +# V2InboxNameBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender** | **str** | | [optional] +**receiver** | **str** | | [optional] +**status** | [**V2InboxStatus**](V2InboxStatus.md) | | [optional] +**create_time** | **datetime** | | [optional] +**type** | [**V2InboxType**](V2InboxType.md) | | [optional] +**activity_id** | **int** | | [optional] + +[[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/docs/V2InboxStatus.md b/docs/V2InboxStatus.md new file mode 100644 index 0000000..fe0f184 --- /dev/null +++ b/docs/V2InboxStatus.md @@ -0,0 +1,8 @@ +# V2InboxStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2InboxType.md b/docs/V2InboxType.md new file mode 100644 index 0000000..cee39de --- /dev/null +++ b/docs/V2InboxType.md @@ -0,0 +1,8 @@ +# V2InboxType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2ListInboxesResponse.md b/docs/V2ListInboxesResponse.md new file mode 100644 index 0000000..6ba3c69 --- /dev/null +++ b/docs/V2ListInboxesResponse.md @@ -0,0 +1,9 @@ +# V2ListInboxesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inboxes** | [**list[V2Inbox]**](V2Inbox.md) | | [optional] + +[[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/docs/V2ListMemoCommentsResponse.md b/docs/V2ListMemoCommentsResponse.md new file mode 100644 index 0000000..0481333 --- /dev/null +++ b/docs/V2ListMemoCommentsResponse.md @@ -0,0 +1,9 @@ +# V2ListMemoCommentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memos** | [**list[V2Memo]**](V2Memo.md) | | [optional] + +[[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/docs/V2ListMemoReactionsResponse.md b/docs/V2ListMemoReactionsResponse.md new file mode 100644 index 0000000..a225aaf --- /dev/null +++ b/docs/V2ListMemoReactionsResponse.md @@ -0,0 +1,9 @@ +# V2ListMemoReactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reactions** | [**list[Apiv2Reaction]**](Apiv2Reaction.md) | | [optional] + +[[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/docs/V2ListMemoRelationsResponse.md b/docs/V2ListMemoRelationsResponse.md new file mode 100644 index 0000000..180823c --- /dev/null +++ b/docs/V2ListMemoRelationsResponse.md @@ -0,0 +1,9 @@ +# V2ListMemoRelationsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**relations** | [**list[V2MemoRelation]**](V2MemoRelation.md) | | [optional] + +[[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/docs/V2ListMemoResourcesResponse.md b/docs/V2ListMemoResourcesResponse.md new file mode 100644 index 0000000..8d848b8 --- /dev/null +++ b/docs/V2ListMemoResourcesResponse.md @@ -0,0 +1,9 @@ +# V2ListMemoResourcesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**list[V2Resource]**](V2Resource.md) | | [optional] + +[[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/docs/V2ListMemosResponse.md b/docs/V2ListMemosResponse.md new file mode 100644 index 0000000..dbb2b93 --- /dev/null +++ b/docs/V2ListMemosResponse.md @@ -0,0 +1,10 @@ +# V2ListMemosResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memos** | [**list[V2Memo]**](V2Memo.md) | | [optional] +**next_page_token** | **str** | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. | [optional] + +[[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/docs/V2ListResourcesResponse.md b/docs/V2ListResourcesResponse.md new file mode 100644 index 0000000..861d235 --- /dev/null +++ b/docs/V2ListResourcesResponse.md @@ -0,0 +1,9 @@ +# V2ListResourcesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**list[V2Resource]**](V2Resource.md) | | [optional] + +[[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/docs/V2ListTagsResponse.md b/docs/V2ListTagsResponse.md new file mode 100644 index 0000000..f85cd55 --- /dev/null +++ b/docs/V2ListTagsResponse.md @@ -0,0 +1,9 @@ +# V2ListTagsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**list[V2Tag]**](V2Tag.md) | | [optional] + +[[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/docs/V2ListUserAccessTokensResponse.md b/docs/V2ListUserAccessTokensResponse.md new file mode 100644 index 0000000..291aa42 --- /dev/null +++ b/docs/V2ListUserAccessTokensResponse.md @@ -0,0 +1,9 @@ +# V2ListUserAccessTokensResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_tokens** | [**list[V2UserAccessToken]**](V2UserAccessToken.md) | | [optional] + +[[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/docs/V2ListUsersResponse.md b/docs/V2ListUsersResponse.md new file mode 100644 index 0000000..82ff820 --- /dev/null +++ b/docs/V2ListUsersResponse.md @@ -0,0 +1,9 @@ +# V2ListUsersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**list[V2User]**](V2User.md) | | [optional] + +[[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/docs/V2ListWebhooksResponse.md b/docs/V2ListWebhooksResponse.md new file mode 100644 index 0000000..91fae88 --- /dev/null +++ b/docs/V2ListWebhooksResponse.md @@ -0,0 +1,9 @@ +# V2ListWebhooksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhooks** | [**list[Apiv2Webhook]**](Apiv2Webhook.md) | | [optional] + +[[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/docs/V2Memo.md b/docs/V2Memo.md new file mode 100644 index 0000000..6498056 --- /dev/null +++ b/docs/V2Memo.md @@ -0,0 +1,23 @@ +# V2Memo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | id is the system generated unique identifier. | [optional] +**name** | **str** | name is the user provided name. | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**creator** | **str** | | [optional] +**creator_id** | **int** | | [optional] +**create_time** | **datetime** | | [optional] +**update_time** | **datetime** | | [optional] +**display_time** | **datetime** | | [optional] +**content** | **str** | | [optional] +**visibility** | [**V2Visibility**](V2Visibility.md) | | [optional] +**pinned** | **bool** | | [optional] +**parent_id** | **int** | | [optional] +**resources** | [**list[V2Resource]**](V2Resource.md) | | [optional] +**relations** | [**list[V2MemoRelation]**](V2MemoRelation.md) | | [optional] +**reactions** | [**list[Apiv2Reaction]**](Apiv2Reaction.md) | | [optional] + +[[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/docs/V2MemoRelation.md b/docs/V2MemoRelation.md new file mode 100644 index 0000000..cd43c00 --- /dev/null +++ b/docs/V2MemoRelation.md @@ -0,0 +1,11 @@ +# V2MemoRelation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo_id** | **int** | | [optional] +**related_memo_id** | **int** | | [optional] +**type** | [**V2MemoRelationType**](V2MemoRelationType.md) | | [optional] + +[[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/docs/V2MemoRelationType.md b/docs/V2MemoRelationType.md new file mode 100644 index 0000000..bf40d47 --- /dev/null +++ b/docs/V2MemoRelationType.md @@ -0,0 +1,8 @@ +# V2MemoRelationType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2RenameTagResponse.md b/docs/V2RenameTagResponse.md new file mode 100644 index 0000000..2233b2b --- /dev/null +++ b/docs/V2RenameTagResponse.md @@ -0,0 +1,9 @@ +# V2RenameTagResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | [**V2Tag**](V2Tag.md) | | [optional] + +[[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/docs/V2Resource.md b/docs/V2Resource.md new file mode 100644 index 0000000..249fe6f --- /dev/null +++ b/docs/V2Resource.md @@ -0,0 +1,16 @@ +# V2Resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | id is the system generated unique identifier. | [optional] +**name** | **str** | name is the user provided name. | [optional] +**create_time** | **datetime** | | [optional] +**filename** | **str** | | [optional] +**external_link** | **str** | | [optional] +**type** | **str** | | [optional] +**size** | **str** | | [optional] +**memo_id** | **int** | | [optional] + +[[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/docs/V2SetMemoRelationsResponse.md b/docs/V2SetMemoRelationsResponse.md new file mode 100644 index 0000000..4cb1144 --- /dev/null +++ b/docs/V2SetMemoRelationsResponse.md @@ -0,0 +1,8 @@ +# V2SetMemoRelationsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2SetMemoResourcesResponse.md b/docs/V2SetMemoResourcesResponse.md new file mode 100644 index 0000000..8210081 --- /dev/null +++ b/docs/V2SetMemoResourcesResponse.md @@ -0,0 +1,8 @@ +# V2SetMemoResourcesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2SetWorkspaceSettingResponse.md b/docs/V2SetWorkspaceSettingResponse.md new file mode 100644 index 0000000..e9eb4ac --- /dev/null +++ b/docs/V2SetWorkspaceSettingResponse.md @@ -0,0 +1,9 @@ +# V2SetWorkspaceSettingResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**setting** | [**Apiv2WorkspaceSetting**](Apiv2WorkspaceSetting.md) | | [optional] + +[[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/docs/V2SettingNameBody.md b/docs/V2SettingNameBody.md new file mode 100644 index 0000000..e257c85 --- /dev/null +++ b/docs/V2SettingNameBody.md @@ -0,0 +1,12 @@ +# V2SettingNameBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**locale** | **str** | The preferred locale of the user. | [optional] +**appearance** | **str** | The preferred appearance of the user. | [optional] +**memo_visibility** | **str** | The default visibility of the memo. | [optional] +**telegram_user_id** | **str** | The telegram user id of the user. | [optional] + +[[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/docs/V2SignInResponse.md b/docs/V2SignInResponse.md new file mode 100644 index 0000000..41a5f2d --- /dev/null +++ b/docs/V2SignInResponse.md @@ -0,0 +1,9 @@ +# V2SignInResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2SignInWithSSOResponse.md b/docs/V2SignInWithSSOResponse.md new file mode 100644 index 0000000..fa4d522 --- /dev/null +++ b/docs/V2SignInWithSSOResponse.md @@ -0,0 +1,9 @@ +# V2SignInWithSSOResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2SignOutResponse.md b/docs/V2SignOutResponse.md new file mode 100644 index 0000000..8a914c5 --- /dev/null +++ b/docs/V2SignOutResponse.md @@ -0,0 +1,8 @@ +# V2SignOutResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2SignUpResponse.md b/docs/V2SignUpResponse.md new file mode 100644 index 0000000..d86adab --- /dev/null +++ b/docs/V2SignUpResponse.md @@ -0,0 +1,9 @@ +# V2SignUpResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2Tag.md b/docs/V2Tag.md new file mode 100644 index 0000000..83bd2a4 --- /dev/null +++ b/docs/V2Tag.md @@ -0,0 +1,10 @@ +# V2Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**creator** | **str** | | [optional] + +[[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/docs/V2UpdateInboxResponse.md b/docs/V2UpdateInboxResponse.md new file mode 100644 index 0000000..efec6c9 --- /dev/null +++ b/docs/V2UpdateInboxResponse.md @@ -0,0 +1,9 @@ +# V2UpdateInboxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox** | [**V2Inbox**](V2Inbox.md) | | [optional] + +[[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/docs/V2UpdateMemoResponse.md b/docs/V2UpdateMemoResponse.md new file mode 100644 index 0000000..9aaa8e3 --- /dev/null +++ b/docs/V2UpdateMemoResponse.md @@ -0,0 +1,9 @@ +# V2UpdateMemoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memo** | [**V2Memo**](V2Memo.md) | | [optional] + +[[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/docs/V2UpdateResourceResponse.md b/docs/V2UpdateResourceResponse.md new file mode 100644 index 0000000..4651bb3 --- /dev/null +++ b/docs/V2UpdateResourceResponse.md @@ -0,0 +1,9 @@ +# V2UpdateResourceResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | [**V2Resource**](V2Resource.md) | | [optional] + +[[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/docs/V2UpdateUserResponse.md b/docs/V2UpdateUserResponse.md new file mode 100644 index 0000000..f47aec3 --- /dev/null +++ b/docs/V2UpdateUserResponse.md @@ -0,0 +1,9 @@ +# V2UpdateUserResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**V2User**](V2User.md) | | [optional] + +[[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/docs/V2UpdateUserSettingResponse.md b/docs/V2UpdateUserSettingResponse.md new file mode 100644 index 0000000..3ff7a6b --- /dev/null +++ b/docs/V2UpdateUserSettingResponse.md @@ -0,0 +1,9 @@ +# V2UpdateUserSettingResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**setting** | [**Apiv2UserSetting**](Apiv2UserSetting.md) | | [optional] + +[[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/docs/V2UpdateWebhookResponse.md b/docs/V2UpdateWebhookResponse.md new file mode 100644 index 0000000..829a82e --- /dev/null +++ b/docs/V2UpdateWebhookResponse.md @@ -0,0 +1,9 @@ +# V2UpdateWebhookResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook** | [**Apiv2Webhook**](Apiv2Webhook.md) | | [optional] + +[[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/docs/V2UpsertMemoReactionResponse.md b/docs/V2UpsertMemoReactionResponse.md new file mode 100644 index 0000000..9302bbf --- /dev/null +++ b/docs/V2UpsertMemoReactionResponse.md @@ -0,0 +1,9 @@ +# V2UpsertMemoReactionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reaction** | [**Apiv2Reaction**](Apiv2Reaction.md) | | [optional] + +[[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/docs/V2UpsertTagRequest.md b/docs/V2UpsertTagRequest.md new file mode 100644 index 0000000..f73c700 --- /dev/null +++ b/docs/V2UpsertTagRequest.md @@ -0,0 +1,9 @@ +# V2UpsertTagRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +[[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/docs/V2UpsertTagResponse.md b/docs/V2UpsertTagResponse.md new file mode 100644 index 0000000..83b38e7 --- /dev/null +++ b/docs/V2UpsertTagResponse.md @@ -0,0 +1,9 @@ +# V2UpsertTagResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | [**V2Tag**](V2Tag.md) | | [optional] + +[[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/docs/V2User.md b/docs/V2User.md new file mode 100644 index 0000000..3b67f8c --- /dev/null +++ b/docs/V2User.md @@ -0,0 +1,19 @@ +# V2User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **int** | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] +**username** | **str** | | [optional] +**email** | **str** | | [optional] +**nickname** | **str** | | [optional] +**avatar_url** | **str** | | [optional] +**password** | **str** | | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**create_time** | **datetime** | | [optional] +**update_time** | **datetime** | | [optional] + +[[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/docs/V2UserAccessToken.md b/docs/V2UserAccessToken.md new file mode 100644 index 0000000..eafc8d5 --- /dev/null +++ b/docs/V2UserAccessToken.md @@ -0,0 +1,12 @@ +# V2UserAccessToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | [optional] +**description** | **str** | | [optional] +**issued_at** | **datetime** | | [optional] +**expires_at** | **datetime** | | [optional] + +[[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/docs/V2UserNameBody.md b/docs/V2UserNameBody.md new file mode 100644 index 0000000..e05892f --- /dev/null +++ b/docs/V2UserNameBody.md @@ -0,0 +1,18 @@ +# V2UserNameBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] +**username** | **str** | | [optional] +**email** | **str** | | [optional] +**nickname** | **str** | | [optional] +**avatar_url** | **str** | | [optional] +**password** | **str** | | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**create_time** | **datetime** | | [optional] +**update_time** | **datetime** | | [optional] + +[[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/docs/V2Visibility.md b/docs/V2Visibility.md new file mode 100644 index 0000000..d4ed8e2 --- /dev/null +++ b/docs/V2Visibility.md @@ -0,0 +1,8 @@ +# V2Visibility + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/V2WorkspaceProfile.md b/docs/V2WorkspaceProfile.md new file mode 100644 index 0000000..9d13d7d --- /dev/null +++ b/docs/V2WorkspaceProfile.md @@ -0,0 +1,14 @@ +# V2WorkspaceProfile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**mode** | **str** | mode is the instance mode (e.g. \"prod\", \"dev\" or \"demo\"). | [optional] +**allow_registration** | **bool** | allow_registration is whether the registration is allowed. | [optional] +**disable_password_login** | **bool** | allow_password_login is whether the password login is allowed. | [optional] +**additional_script** | **str** | additional_script is the additional script. | [optional] +**additional_style** | **str** | additional_style is the additional style. | [optional] + +[[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/docs/WebhookServiceApi.md b/docs/WebhookServiceApi.md new file mode 100644 index 0000000..480092d --- /dev/null +++ b/docs/WebhookServiceApi.md @@ -0,0 +1,244 @@ +# memos.WebhookServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**webhook_service_create_webhook**](WebhookServiceApi.md#webhook_service_create_webhook) | **POST** /api/v2/webhooks | CreateWebhook creates a new webhook. +[**webhook_service_delete_webhook**](WebhookServiceApi.md#webhook_service_delete_webhook) | **DELETE** /api/v2/webhooks/{id} | DeleteWebhook deletes a webhook by id. +[**webhook_service_get_webhook**](WebhookServiceApi.md#webhook_service_get_webhook) | **GET** /api/v2/webhooks/{id} | GetWebhook returns a webhook by id. +[**webhook_service_list_webhooks**](WebhookServiceApi.md#webhook_service_list_webhooks) | **GET** /api/v2/webhooks | ListWebhooks returns a list of webhooks. +[**webhook_service_update_webhook**](WebhookServiceApi.md#webhook_service_update_webhook) | **PATCH** /api/v2/webhooks/{webhook.id} | UpdateWebhook updates a webhook. + +# **webhook_service_create_webhook** +> V2CreateWebhookResponse webhook_service_create_webhook(body) + +CreateWebhook creates a new webhook. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WebhookServiceApi() +body = memos.V2CreateWebhookRequest() # V2CreateWebhookRequest | + +try: + # CreateWebhook creates a new webhook. + api_response = api_instance.webhook_service_create_webhook(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhookServiceApi->webhook_service_create_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V2CreateWebhookRequest**](V2CreateWebhookRequest.md)| | + +### Return type + +[**V2CreateWebhookResponse**](V2CreateWebhookResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhook_service_delete_webhook** +> V2DeleteWebhookResponse webhook_service_delete_webhook(id) + +DeleteWebhook deletes a webhook by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WebhookServiceApi() +id = 56 # int | + +try: + # DeleteWebhook deletes a webhook by id. + api_response = api_instance.webhook_service_delete_webhook(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhookServiceApi->webhook_service_delete_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2DeleteWebhookResponse**](V2DeleteWebhookResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhook_service_get_webhook** +> V2GetWebhookResponse webhook_service_get_webhook(id) + +GetWebhook returns a webhook by id. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WebhookServiceApi() +id = 56 # int | + +try: + # GetWebhook returns a webhook by id. + api_response = api_instance.webhook_service_get_webhook(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhookServiceApi->webhook_service_get_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**V2GetWebhookResponse**](V2GetWebhookResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhook_service_list_webhooks** +> V2ListWebhooksResponse webhook_service_list_webhooks(creator_id=creator_id) + +ListWebhooks returns a list of webhooks. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WebhookServiceApi() +creator_id = 56 # int | (optional) + +try: + # ListWebhooks returns a list of webhooks. + api_response = api_instance.webhook_service_list_webhooks(creator_id=creator_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhookServiceApi->webhook_service_list_webhooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **creator_id** | **int**| | [optional] + +### Return type + +[**V2ListWebhooksResponse**](V2ListWebhooksResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhook_service_update_webhook** +> V2UpdateWebhookResponse webhook_service_update_webhook(body, webhook_id) + +UpdateWebhook updates a webhook. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WebhookServiceApi() +body = memos.WebhooksWebhookIdBody() # WebhooksWebhookIdBody | +webhook_id = 56 # int | + +try: + # UpdateWebhook updates a webhook. + api_response = api_instance.webhook_service_update_webhook(body, webhook_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhookServiceApi->webhook_service_update_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**WebhooksWebhookIdBody**](WebhooksWebhookIdBody.md)| | + **webhook_id** | **int**| | + +### Return type + +[**V2UpdateWebhookResponse**](V2UpdateWebhookResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WebhooksWebhookIdBody.md b/docs/WebhooksWebhookIdBody.md new file mode 100644 index 0000000..6d6f935 --- /dev/null +++ b/docs/WebhooksWebhookIdBody.md @@ -0,0 +1,14 @@ +# WebhooksWebhookIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creator_id** | **int** | | [optional] +**created_time** | **datetime** | | [optional] +**updated_time** | **datetime** | | [optional] +**row_status** | [**Apiv2RowStatus**](Apiv2RowStatus.md) | | [optional] +**name** | **str** | | [optional] +**url** | **str** | | [optional] + +[[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/docs/WorkspaceServiceApi.md b/docs/WorkspaceServiceApi.md new file mode 100644 index 0000000..56e610d --- /dev/null +++ b/docs/WorkspaceServiceApi.md @@ -0,0 +1,50 @@ +# memos.WorkspaceServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**workspace_service_get_workspace_profile**](WorkspaceServiceApi.md#workspace_service_get_workspace_profile) | **GET** /api/v2/workspace/profile | GetWorkspaceProfile returns the workspace profile. + +# **workspace_service_get_workspace_profile** +> V2GetWorkspaceProfileResponse workspace_service_get_workspace_profile() + +GetWorkspaceProfile returns the workspace profile. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WorkspaceServiceApi() + +try: + # GetWorkspaceProfile returns the workspace profile. + api_response = api_instance.workspace_service_get_workspace_profile() + pprint(api_response) +except ApiException as e: + print("Exception when calling WorkspaceServiceApi->workspace_service_get_workspace_profile: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V2GetWorkspaceProfileResponse**](V2GetWorkspaceProfileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WorkspaceSettingServiceApi.md b/docs/WorkspaceSettingServiceApi.md new file mode 100644 index 0000000..3ffeae5 --- /dev/null +++ b/docs/WorkspaceSettingServiceApi.md @@ -0,0 +1,103 @@ +# memos.WorkspaceSettingServiceApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**workspace_setting_service_get_workspace_setting**](WorkspaceSettingServiceApi.md#workspace_setting_service_get_workspace_setting) | **GET** /api/v2/workspace/{name} | GetWorkspaceSetting returns the setting by name. +[**workspace_setting_service_set_workspace_setting**](WorkspaceSettingServiceApi.md#workspace_setting_service_set_workspace_setting) | **PATCH** /api/v2/workspace/{setting.name} | SetWorkspaceSetting updates the setting. + +# **workspace_setting_service_get_workspace_setting** +> V2GetWorkspaceSettingResponse workspace_setting_service_get_workspace_setting(name) + +GetWorkspaceSetting returns the setting by name. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WorkspaceSettingServiceApi() +name = 'name_example' # str | The resource name of the workspace setting. Format: settings/{setting} + +try: + # GetWorkspaceSetting returns the setting by name. + api_response = api_instance.workspace_setting_service_get_workspace_setting(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling WorkspaceSettingServiceApi->workspace_setting_service_get_workspace_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The resource name of the workspace setting. Format: settings/{setting} | + +### Return type + +[**V2GetWorkspaceSettingResponse**](V2GetWorkspaceSettingResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **workspace_setting_service_set_workspace_setting** +> V2SetWorkspaceSettingResponse workspace_setting_service_set_workspace_setting(body, setting_name) + +SetWorkspaceSetting updates the setting. + +### Example +```python +from __future__ import print_function +import time +import memos +from memos.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = memos.WorkspaceSettingServiceApi() +body = memos.SettingIsTheSettingToUpdate_() # SettingIsTheSettingToUpdate_ | setting is the setting to update. +setting_name = 'setting_name_example' # str | name is the name of the setting. Format: settings/{setting} + +try: + # SetWorkspaceSetting updates the setting. + api_response = api_instance.workspace_setting_service_set_workspace_setting(body, setting_name) + pprint(api_response) +except ApiException as e: + print("Exception when calling WorkspaceSettingServiceApi->workspace_setting_service_set_workspace_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SettingIsTheSettingToUpdate_**](SettingIsTheSettingToUpdate_.md)| setting is the setting to update. | + **setting_name** | **str**| name is the name of the setting. Format: settings/{setting} | + +### Return type + +[**V2SetWorkspaceSettingResponse**](V2SetWorkspaceSettingResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..d147842 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/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 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="looching" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="memos-python" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new 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://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/main.py b/main.py new file mode 100644 index 0000000..1e7502e --- /dev/null +++ b/main.py @@ -0,0 +1,39 @@ +import memos +import re + + +token = '' +api_client = memos.ApiClient() +api_client.configuration.host = 'https://memos.tunpok.com' +api_client.set_default_header('Authorization', f'Bearer {token}') +memo_client = memos.MemoServiceApi(api_client) + + +def add_url_tag(memo): + """ if memo has url, add tag '网页' to it. + """ + # if content has url that starts with http or https + # get the url + url = None + if re.search(r'http[s]?://', memo.content): + url = re.search(r'http[s]?://[^\s]+', memo.content).group() + modified = False + if url: + # if not already has tag '#网页 ', add it + if not re.search(r'#网页 ', memo.content): + memo.content += ' #网页 ' + modified = True + if modified: + memo_client.memo_service_update_memo(memo, memo.id) + + +if __name__ == '__main__': + next_page_token = None + while next_page_token != '': + if next_page_token is None: + next_page_token = '' + memos_resp = memo_client.memo_service_list_memos(page_token=next_page_token) + for memo in memos_resp.memos: + add_url_tag(memo) + next_page_token = memos_resp.next_page_token + diff --git a/memos/__init__.py b/memos/__init__.py new file mode 100644 index 0000000..624a54b --- /dev/null +++ b/memos/__init__.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +# flake8: noqa + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +# import apis into sdk package +from memos.api.activity_service_api import ActivityServiceApi +from memos.api.auth_service_api import AuthServiceApi +from memos.api.inbox_service_api import InboxServiceApi +from memos.api.memo_service_api import MemoServiceApi +from memos.api.resource_service_api import ResourceServiceApi +from memos.api.tag_service_api import TagServiceApi +from memos.api.user_service_api import UserServiceApi +from memos.api.webhook_service_api import WebhookServiceApi +from memos.api.workspace_service_api import WorkspaceServiceApi +from memos.api.workspace_setting_service_api import WorkspaceSettingServiceApi +# import ApiClient +from memos.api_client import ApiClient +from memos.configuration import Configuration +# import models into sdk package +from memos.models.apiv2_activity_memo_comment_payload import Apiv2ActivityMemoCommentPayload +from memos.models.apiv2_activity_payload import Apiv2ActivityPayload +from memos.models.apiv2_activity_version_update_payload import Apiv2ActivityVersionUpdatePayload +from memos.models.apiv2_reaction import Apiv2Reaction +from memos.models.apiv2_reaction_type import Apiv2ReactionType +from memos.models.apiv2_row_status import Apiv2RowStatus +from memos.models.apiv2_user_setting import Apiv2UserSetting +from memos.models.apiv2_webhook import Apiv2Webhook +from memos.models.apiv2_workspace_general_setting import Apiv2WorkspaceGeneralSetting +from memos.models.apiv2_workspace_setting import Apiv2WorkspaceSetting +from memos.models.googlerpc_status import GooglerpcStatus +from memos.models.memo_service_set_memo_relations_body import MemoServiceSetMemoRelationsBody +from memos.models.memo_service_set_memo_resources_body import MemoServiceSetMemoResourcesBody +from memos.models.memos_memo_id_body import MemosMemoIdBody +from memos.models.protobuf_any import ProtobufAny +from memos.models.resources_resource_id_body import ResourcesResourceIdBody +from memos.models.setting_is_the_setting_to_update_ import SettingIsTheSettingToUpdate_ +from memos.models.user_role import UserRole +from memos.models.user_service_create_user_access_token_body import UserServiceCreateUserAccessTokenBody +from memos.models.v2_activity import V2Activity +from memos.models.v2_batch_upsert_tag_response import V2BatchUpsertTagResponse +from memos.models.v2_create_memo_comment_response import V2CreateMemoCommentResponse +from memos.models.v2_create_memo_request import V2CreateMemoRequest +from memos.models.v2_create_memo_response import V2CreateMemoResponse +from memos.models.v2_create_resource_response import V2CreateResourceResponse +from memos.models.v2_create_user_access_token_response import V2CreateUserAccessTokenResponse +from memos.models.v2_create_user_response import V2CreateUserResponse +from memos.models.v2_create_webhook_request import V2CreateWebhookRequest +from memos.models.v2_create_webhook_response import V2CreateWebhookResponse +from memos.models.v2_delete_inbox_response import V2DeleteInboxResponse +from memos.models.v2_delete_memo_reaction_response import V2DeleteMemoReactionResponse +from memos.models.v2_delete_memo_response import V2DeleteMemoResponse +from memos.models.v2_delete_resource_response import V2DeleteResourceResponse +from memos.models.v2_delete_tag_response import V2DeleteTagResponse +from memos.models.v2_delete_user_access_token_response import V2DeleteUserAccessTokenResponse +from memos.models.v2_delete_user_response import V2DeleteUserResponse +from memos.models.v2_delete_webhook_response import V2DeleteWebhookResponse +from memos.models.v2_export_memos_response import V2ExportMemosResponse +from memos.models.v2_get_activity_response import V2GetActivityResponse +from memos.models.v2_get_auth_status_response import V2GetAuthStatusResponse +from memos.models.v2_get_memo_by_name_response import V2GetMemoByNameResponse +from memos.models.v2_get_memo_response import V2GetMemoResponse +from memos.models.v2_get_resource_by_name_response import V2GetResourceByNameResponse +from memos.models.v2_get_resource_response import V2GetResourceResponse +from memos.models.v2_get_tag_suggestions_response import V2GetTagSuggestionsResponse +from memos.models.v2_get_user_memos_stats_response import V2GetUserMemosStatsResponse +from memos.models.v2_get_user_response import V2GetUserResponse +from memos.models.v2_get_user_setting_response import V2GetUserSettingResponse +from memos.models.v2_get_webhook_response import V2GetWebhookResponse +from memos.models.v2_get_workspace_profile_response import V2GetWorkspaceProfileResponse +from memos.models.v2_get_workspace_setting_response import V2GetWorkspaceSettingResponse +from memos.models.v2_inbox import V2Inbox +from memos.models.v2_inbox_name_body import V2InboxNameBody +from memos.models.v2_inbox_status import V2InboxStatus +from memos.models.v2_inbox_type import V2InboxType +from memos.models.v2_list_inboxes_response import V2ListInboxesResponse +from memos.models.v2_list_memo_comments_response import V2ListMemoCommentsResponse +from memos.models.v2_list_memo_reactions_response import V2ListMemoReactionsResponse +from memos.models.v2_list_memo_relations_response import V2ListMemoRelationsResponse +from memos.models.v2_list_memo_resources_response import V2ListMemoResourcesResponse +from memos.models.v2_list_memos_response import V2ListMemosResponse +from memos.models.v2_list_resources_response import V2ListResourcesResponse +from memos.models.v2_list_tags_response import V2ListTagsResponse +from memos.models.v2_list_user_access_tokens_response import V2ListUserAccessTokensResponse +from memos.models.v2_list_users_response import V2ListUsersResponse +from memos.models.v2_list_webhooks_response import V2ListWebhooksResponse +from memos.models.v2_memo import V2Memo +from memos.models.v2_memo_relation import V2MemoRelation +from memos.models.v2_memo_relation_type import V2MemoRelationType +from memos.models.v2_rename_tag_response import V2RenameTagResponse +from memos.models.v2_resource import V2Resource +from memos.models.v2_set_memo_relations_response import V2SetMemoRelationsResponse +from memos.models.v2_set_memo_resources_response import V2SetMemoResourcesResponse +from memos.models.v2_set_workspace_setting_response import V2SetWorkspaceSettingResponse +from memos.models.v2_setting_name_body import V2SettingNameBody +from memos.models.v2_sign_in_response import V2SignInResponse +from memos.models.v2_sign_in_with_sso_response import V2SignInWithSSOResponse +from memos.models.v2_sign_out_response import V2SignOutResponse +from memos.models.v2_sign_up_response import V2SignUpResponse +from memos.models.v2_tag import V2Tag +from memos.models.v2_update_inbox_response import V2UpdateInboxResponse +from memos.models.v2_update_memo_response import V2UpdateMemoResponse +from memos.models.v2_update_resource_response import V2UpdateResourceResponse +from memos.models.v2_update_user_response import V2UpdateUserResponse +from memos.models.v2_update_user_setting_response import V2UpdateUserSettingResponse +from memos.models.v2_update_webhook_response import V2UpdateWebhookResponse +from memos.models.v2_upsert_memo_reaction_response import V2UpsertMemoReactionResponse +from memos.models.v2_upsert_tag_request import V2UpsertTagRequest +from memos.models.v2_upsert_tag_response import V2UpsertTagResponse +from memos.models.v2_user import V2User +from memos.models.v2_user_access_token import V2UserAccessToken +from memos.models.v2_user_name_body import V2UserNameBody +from memos.models.v2_visibility import V2Visibility +from memos.models.v2_workspace_profile import V2WorkspaceProfile +from memos.models.webhooks_webhook_id_body import WebhooksWebhookIdBody diff --git a/memos/api/__init__.py b/memos/api/__init__.py new file mode 100644 index 0000000..68de4f2 --- /dev/null +++ b/memos/api/__init__.py @@ -0,0 +1,15 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from memos.api.activity_service_api import ActivityServiceApi +from memos.api.auth_service_api import AuthServiceApi +from memos.api.inbox_service_api import InboxServiceApi +from memos.api.memo_service_api import MemoServiceApi +from memos.api.resource_service_api import ResourceServiceApi +from memos.api.tag_service_api import TagServiceApi +from memos.api.user_service_api import UserServiceApi +from memos.api.webhook_service_api import WebhookServiceApi +from memos.api.workspace_service_api import WorkspaceServiceApi +from memos.api.workspace_setting_service_api import WorkspaceSettingServiceApi diff --git a/memos/api/activity_service_api.py b/memos/api/activity_service_api.py new file mode 100644 index 0000000..53e8584 --- /dev/null +++ b/memos/api/activity_service_api.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class ActivityServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def activity_service_get_activity(self, id, **kwargs): # noqa: E501 + """GetActivity returns the activity with the given id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activity_service_get_activity(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetActivityResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.activity_service_get_activity_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.activity_service_get_activity_with_http_info(id, **kwargs) # noqa: E501 + return data + + def activity_service_get_activity_with_http_info(self, id, **kwargs): # noqa: E501 + """GetActivity returns the activity with the given id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activity_service_get_activity_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetActivityResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method activity_service_get_activity" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `activity_service_get_activity`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/activities/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetActivityResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/auth_service_api.py b/memos/api/auth_service_api.py new file mode 100644 index 0000000..e53a4fe --- /dev/null +++ b/memos/api/auth_service_api.py @@ -0,0 +1,490 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class AuthServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def auth_service_get_auth_status(self, **kwargs): # noqa: E501 + """GetAuthStatus returns the current auth status of the user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_get_auth_status(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2GetAuthStatusResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auth_service_get_auth_status_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auth_service_get_auth_status_with_http_info(**kwargs) # noqa: E501 + return data + + def auth_service_get_auth_status_with_http_info(self, **kwargs): # noqa: E501 + """GetAuthStatus returns the current auth status of the user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_get_auth_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2GetAuthStatusResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auth_service_get_auth_status" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/auth/status', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetAuthStatusResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def auth_service_sign_in(self, **kwargs): # noqa: E501 + """SignIn signs in the user with the given username and password. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_in(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: + :param str password: + :param bool never_expire: + :return: V2SignInResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auth_service_sign_in_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auth_service_sign_in_with_http_info(**kwargs) # noqa: E501 + return data + + def auth_service_sign_in_with_http_info(self, **kwargs): # noqa: E501 + """SignIn signs in the user with the given username and password. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_in_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: + :param str password: + :param bool never_expire: + :return: V2SignInResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'password', 'never_expire'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auth_service_sign_in" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'username' in params: + query_params.append(('username', params['username'])) # noqa: E501 + if 'password' in params: + query_params.append(('password', params['password'])) # noqa: E501 + if 'never_expire' in params: + query_params.append(('neverExpire', params['never_expire'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/auth/signin', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SignInResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def auth_service_sign_in_with_sso(self, **kwargs): # noqa: E501 + """SignInWithSSO signs in the user with the given SSO code. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_in_with_sso(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int idp_id: + :param str code: + :param str redirect_uri: + :return: V2SignInWithSSOResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auth_service_sign_in_with_sso_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auth_service_sign_in_with_sso_with_http_info(**kwargs) # noqa: E501 + return data + + def auth_service_sign_in_with_sso_with_http_info(self, **kwargs): # noqa: E501 + """SignInWithSSO signs in the user with the given SSO code. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_in_with_sso_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int idp_id: + :param str code: + :param str redirect_uri: + :return: V2SignInWithSSOResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['idp_id', 'code', 'redirect_uri'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auth_service_sign_in_with_sso" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'idp_id' in params: + query_params.append(('idpId', params['idp_id'])) # noqa: E501 + if 'code' in params: + query_params.append(('code', params['code'])) # noqa: E501 + if 'redirect_uri' in params: + query_params.append(('redirectUri', params['redirect_uri'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/auth/signin/sso', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SignInWithSSOResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def auth_service_sign_out(self, **kwargs): # noqa: E501 + """SignOut signs out the user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_out(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2SignOutResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auth_service_sign_out_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auth_service_sign_out_with_http_info(**kwargs) # noqa: E501 + return data + + def auth_service_sign_out_with_http_info(self, **kwargs): # noqa: E501 + """SignOut signs out the user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_out_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2SignOutResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auth_service_sign_out" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/auth/signout', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SignOutResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def auth_service_sign_up(self, **kwargs): # noqa: E501 + """SignUp signs up the user with the given username and password. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_up(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: + :param str password: + :return: V2SignUpResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auth_service_sign_up_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auth_service_sign_up_with_http_info(**kwargs) # noqa: E501 + return data + + def auth_service_sign_up_with_http_info(self, **kwargs): # noqa: E501 + """SignUp signs up the user with the given username and password. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_service_sign_up_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: + :param str password: + :return: V2SignUpResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'password'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auth_service_sign_up" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'username' in params: + query_params.append(('username', params['username'])) # noqa: E501 + if 'password' in params: + query_params.append(('password', params['password'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/auth/signup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SignUpResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/inbox_service_api.py b/memos/api/inbox_service_api.py new file mode 100644 index 0000000..31a452d --- /dev/null +++ b/memos/api/inbox_service_api.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class InboxServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def inbox_service_delete_inbox(self, name_1, **kwargs): # noqa: E501 + """DeleteInbox deletes an inbox. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_delete_inbox(name_1, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name_1: The name of the inbox to delete. Format: inboxes/{uid} (required) + :return: V2DeleteInboxResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.inbox_service_delete_inbox_with_http_info(name_1, **kwargs) # noqa: E501 + else: + (data) = self.inbox_service_delete_inbox_with_http_info(name_1, **kwargs) # noqa: E501 + return data + + def inbox_service_delete_inbox_with_http_info(self, name_1, **kwargs): # noqa: E501 + """DeleteInbox deletes an inbox. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_delete_inbox_with_http_info(name_1, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name_1: The name of the inbox to delete. Format: inboxes/{uid} (required) + :return: V2DeleteInboxResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name_1'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method inbox_service_delete_inbox" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name_1' is set + if ('name_1' not in params or + params['name_1'] is None): + raise ValueError("Missing the required parameter `name_1` when calling `inbox_service_delete_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name_1' in params: + path_params['name_1'] = params['name_1'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name_1}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteInboxResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def inbox_service_list_inboxes(self, **kwargs): # noqa: E501 + """ListInboxes lists inboxes for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_list_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Format: users/{username} + :return: V2ListInboxesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.inbox_service_list_inboxes_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.inbox_service_list_inboxes_with_http_info(**kwargs) # noqa: E501 + return data + + def inbox_service_list_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """ListInboxes lists inboxes for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_list_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Format: users/{username} + :return: V2ListInboxesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method inbox_service_list_inboxes" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/inboxes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListInboxesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def inbox_service_update_inbox(self, body, inbox_name, **kwargs): # noqa: E501 + """UpdateInbox updates an inbox. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_update_inbox(body, inbox_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2InboxNameBody body: (required) + :param str inbox_name: The name of the inbox. Format: inboxes/{uid} (required) + :return: V2UpdateInboxResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.inbox_service_update_inbox_with_http_info(body, inbox_name, **kwargs) # noqa: E501 + else: + (data) = self.inbox_service_update_inbox_with_http_info(body, inbox_name, **kwargs) # noqa: E501 + return data + + def inbox_service_update_inbox_with_http_info(self, body, inbox_name, **kwargs): # noqa: E501 + """UpdateInbox updates an inbox. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.inbox_service_update_inbox_with_http_info(body, inbox_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2InboxNameBody body: (required) + :param str inbox_name: The name of the inbox. Format: inboxes/{uid} (required) + :return: V2UpdateInboxResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'inbox_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method inbox_service_update_inbox" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `inbox_service_update_inbox`") # noqa: E501 + # verify the required parameter 'inbox_name' is set + if ('inbox_name' not in params or + params['inbox_name'] is None): + raise ValueError("Missing the required parameter `inbox_name` when calling `inbox_service_update_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_name' in params: + path_params['inbox.name'] = params['inbox_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{inbox.name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateInboxResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/memo_service_api.py b/memos/api/memo_service_api.py new file mode 100644 index 0000000..6227c2e --- /dev/null +++ b/memos/api/memo_service_api.py @@ -0,0 +1,1690 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class MemoServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def memo_service_create_memo(self, body, **kwargs): # noqa: E501 + """CreateMemo creates a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_create_memo(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2CreateMemoRequest body: (required) + :return: V2CreateMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_create_memo_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_create_memo_with_http_info(body, **kwargs) # noqa: E501 + return data + + def memo_service_create_memo_with_http_info(self, body, **kwargs): # noqa: E501 + """CreateMemo creates a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_create_memo_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2CreateMemoRequest body: (required) + :return: V2CreateMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_create_memo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `memo_service_create_memo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateMemoResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_create_memo_comment(self, id, **kwargs): # noqa: E501 + """CreateMemoComment creates a comment for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_create_memo_comment(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id is the memo id to create comment for. (required) + :param str create_content: + :param str create_visibility: + :return: V2CreateMemoCommentResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_create_memo_comment_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_create_memo_comment_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_create_memo_comment_with_http_info(self, id, **kwargs): # noqa: E501 + """CreateMemoComment creates a comment for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_create_memo_comment_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id is the memo id to create comment for. (required) + :param str create_content: + :param str create_visibility: + :return: V2CreateMemoCommentResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'create_content', 'create_visibility'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_create_memo_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_create_memo_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'create_content' in params: + query_params.append(('create.content', params['create_content'])) # noqa: E501 + if 'create_visibility' in params: + query_params.append(('create.visibility', params['create_visibility'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/comments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateMemoCommentResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_delete_memo(self, id, **kwargs): # noqa: E501 + """DeleteMemo deletes a memo by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_delete_memo(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_delete_memo_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_delete_memo_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_delete_memo_with_http_info(self, id, **kwargs): # noqa: E501 + """DeleteMemo deletes a memo by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_delete_memo_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_delete_memo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_delete_memo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteMemoResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_delete_memo_reaction(self, id, reaction_id, **kwargs): # noqa: E501 + """DeleteMemoReaction deletes a reaction for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_delete_memo_reaction(id, reaction_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param int reaction_id: (required) + :return: V2DeleteMemoReactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, **kwargs) # noqa: E501 + return data + + def memo_service_delete_memo_reaction_with_http_info(self, id, reaction_id, **kwargs): # noqa: E501 + """DeleteMemoReaction deletes a reaction for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param int reaction_id: (required) + :return: V2DeleteMemoReactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'reaction_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_delete_memo_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_delete_memo_reaction`") # noqa: E501 + # verify the required parameter 'reaction_id' is set + if ('reaction_id' not in params or + params['reaction_id'] is None): + raise ValueError("Missing the required parameter `reaction_id` when calling `memo_service_delete_memo_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'reaction_id' in params: + path_params['reactionId'] = params['reaction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/reactions/{reactionId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteMemoReactionResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_export_memos(self, **kwargs): # noqa: E501 + """ExportMemos exports memos. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_export_memos(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str filter: Same as ListMemosRequest.filter + :return: V2ExportMemosResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_export_memos_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.memo_service_export_memos_with_http_info(**kwargs) # noqa: E501 + return data + + def memo_service_export_memos_with_http_info(self, **kwargs): # noqa: E501 + """ExportMemos exports memos. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_export_memos_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str filter: Same as ListMemosRequest.filter + :return: V2ExportMemosResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['filter'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_export_memos" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos:export', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ExportMemosResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_get_memo(self, id, **kwargs): # noqa: E501 + """GetMemo gets a memo by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_memo(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_get_memo_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_get_memo_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_get_memo_with_http_info(self, id, **kwargs): # noqa: E501 + """GetMemo gets a memo by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_memo_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_get_memo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_get_memo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetMemoResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_get_memo_by_name(self, name, **kwargs): # noqa: E501 + """GetMemoByName gets a memo by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_memo_by_name(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: V2GetMemoByNameResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_get_memo_by_name_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_get_memo_by_name_with_http_info(name, **kwargs) # noqa: E501 + return data + + def memo_service_get_memo_by_name_with_http_info(self, name, **kwargs): # noqa: E501 + """GetMemoByName gets a memo by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_memo_by_name_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: V2GetMemoByNameResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_get_memo_by_name" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `memo_service_get_memo_by_name`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/name/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetMemoByNameResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_get_user_memos_stats(self, **kwargs): # noqa: E501 + """GetUserMemosStats gets stats of memos for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_user_memos_stats(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name is the name of the user to get stats for. Format: users/{username} + :param str timezone: timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + :param str filter: Same as ListMemosRequest.filter + :return: V2GetUserMemosStatsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_get_user_memos_stats_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.memo_service_get_user_memos_stats_with_http_info(**kwargs) # noqa: E501 + return data + + def memo_service_get_user_memos_stats_with_http_info(self, **kwargs): # noqa: E501 + """GetUserMemosStats gets stats of memos for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_get_user_memos_stats_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name is the name of the user to get stats for. Format: users/{username} + :param str timezone: timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + :param str filter: Same as ListMemosRequest.filter + :return: V2GetUserMemosStatsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'timezone', 'filter'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_get_user_memos_stats" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + if 'timezone' in params: + query_params.append(('timezone', params['timezone'])) # noqa: E501 + if 'filter' in params: + query_params.append(('filter', params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/stats', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetUserMemosStatsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_list_memo_comments(self, id, **kwargs): # noqa: E501 + """ListMemoComments lists comments for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_comments(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoCommentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_list_memo_comments_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_list_memo_comments_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_list_memo_comments_with_http_info(self, id, **kwargs): # noqa: E501 + """ListMemoComments lists comments for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_comments_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoCommentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_list_memo_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListMemoCommentsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_list_memo_reactions(self, id, **kwargs): # noqa: E501 + """ListMemoReactions lists reactions for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_reactions(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoReactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_list_memo_reactions_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_list_memo_reactions_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_list_memo_reactions_with_http_info(self, id, **kwargs): # noqa: E501 + """ListMemoReactions lists reactions for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_reactions_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoReactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_list_memo_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_reactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListMemoReactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_list_memo_relations(self, id, **kwargs): # noqa: E501 + """ListMemoRelations lists relations for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_relations(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoRelationsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_list_memo_relations_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_list_memo_relations_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_list_memo_relations_with_http_info(self, id, **kwargs): # noqa: E501 + """ListMemoRelations lists relations for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_relations_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoRelationsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_list_memo_relations" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_relations`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/relations', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListMemoRelationsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_list_memo_resources(self, id, **kwargs): # noqa: E501 + """ListMemoResources lists resources for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_resources(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_list_memo_resources_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_list_memo_resources_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_list_memo_resources_with_http_info(self, id, **kwargs): # noqa: E501 + """ListMemoResources lists resources for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memo_resources_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2ListMemoResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_list_memo_resources" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_resources`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/resources', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListMemoResourcesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_list_memos(self, **kwargs): # noqa: E501 + """ListMemos lists memos with pagination and filter. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memos(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: The maximum number of memos to return. + :param str page_token: A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page. + :param str filter: Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\" + :return: V2ListMemosResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_list_memos_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.memo_service_list_memos_with_http_info(**kwargs) # noqa: E501 + return data + + def memo_service_list_memos_with_http_info(self, **kwargs): # noqa: E501 + """ListMemos lists memos with pagination and filter. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_list_memos_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: The maximum number of memos to return. + :param str page_token: A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page. + :param str filter: Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\" + :return: V2ListMemosResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page_token', 'filter'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_list_memos" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page_token' in params: + query_params.append(('pageToken', params['page_token'])) # noqa: E501 + if 'filter' in params: + query_params.append(('filter', params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListMemosResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_set_memo_relations(self, body, id, **kwargs): # noqa: E501 + """SetMemoRelations sets relations for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_set_memo_relations(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemoServiceSetMemoRelationsBody body: (required) + :param int id: (required) + :return: V2SetMemoRelationsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_set_memo_relations_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_set_memo_relations_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def memo_service_set_memo_relations_with_http_info(self, body, id, **kwargs): # noqa: E501 + """SetMemoRelations sets relations for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_set_memo_relations_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemoServiceSetMemoRelationsBody body: (required) + :param int id: (required) + :return: V2SetMemoRelationsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_set_memo_relations" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `memo_service_set_memo_relations`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_set_memo_relations`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/relations', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SetMemoRelationsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_set_memo_resources(self, body, id, **kwargs): # noqa: E501 + """SetMemoResources sets resources for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_set_memo_resources(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemoServiceSetMemoResourcesBody body: (required) + :param int id: (required) + :return: V2SetMemoResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_set_memo_resources_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_set_memo_resources_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def memo_service_set_memo_resources_with_http_info(self, body, id, **kwargs): # noqa: E501 + """SetMemoResources sets resources for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_set_memo_resources_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemoServiceSetMemoResourcesBody body: (required) + :param int id: (required) + :return: V2SetMemoResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_set_memo_resources" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `memo_service_set_memo_resources`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_set_memo_resources`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/resources', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SetMemoResourcesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_update_memo(self, body, memo_id, **kwargs): # noqa: E501 + """UpdateMemo updates a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_update_memo(body, memo_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemosMemoIdBody body: (required) + :param int memo_id: id is the system generated unique identifier. (required) + :return: V2UpdateMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_update_memo_with_http_info(body, memo_id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_update_memo_with_http_info(body, memo_id, **kwargs) # noqa: E501 + return data + + def memo_service_update_memo_with_http_info(self, body, memo_id, **kwargs): # noqa: E501 + """UpdateMemo updates a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_update_memo_with_http_info(body, memo_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MemosMemoIdBody body: (required) + :param int memo_id: id is the system generated unique identifier. (required) + :return: V2UpdateMemoResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'memo_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_update_memo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `memo_service_update_memo`") # noqa: E501 + # verify the required parameter 'memo_id' is set + if ('memo_id' not in params or + params['memo_id'] is None): + raise ValueError("Missing the required parameter `memo_id` when calling `memo_service_update_memo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'memo_id' in params: + path_params['memo.id'] = params['memo_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{memo.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateMemoResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def memo_service_upsert_memo_reaction(self, id, **kwargs): # noqa: E501 + """UpsertMemoReaction upserts a reaction for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_upsert_memo_reaction(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param int reaction_id: + :param str reaction_creator: + :param str reaction_content_id: + :param str reaction_reaction_type: + :return: V2UpsertMemoReactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.memo_service_upsert_memo_reaction_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.memo_service_upsert_memo_reaction_with_http_info(id, **kwargs) # noqa: E501 + return data + + def memo_service_upsert_memo_reaction_with_http_info(self, id, **kwargs): # noqa: E501 + """UpsertMemoReaction upserts a reaction for a memo. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.memo_service_upsert_memo_reaction_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param int reaction_id: + :param str reaction_creator: + :param str reaction_content_id: + :param str reaction_reaction_type: + :return: V2UpsertMemoReactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'reaction_id', 'reaction_creator', 'reaction_content_id', 'reaction_reaction_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method memo_service_upsert_memo_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `memo_service_upsert_memo_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'reaction_id' in params: + query_params.append(('reaction.id', params['reaction_id'])) # noqa: E501 + if 'reaction_creator' in params: + query_params.append(('reaction.creator', params['reaction_creator'])) # noqa: E501 + if 'reaction_content_id' in params: + query_params.append(('reaction.contentId', params['reaction_content_id'])) # noqa: E501 + if 'reaction_reaction_type' in params: + query_params.append(('reaction.reactionType', params['reaction_reaction_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/memos/{id}/reactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpsertMemoReactionResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/resource_service_api.py b/memos/api/resource_service_api.py new file mode 100644 index 0000000..60c3d13 --- /dev/null +++ b/memos/api/resource_service_api.py @@ -0,0 +1,603 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class ResourceServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def resource_service_create_resource(self, **kwargs): # noqa: E501 + """CreateResource creates a new resource. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_create_resource(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str filename: + :param str external_link: + :param str type: + :param int memo_id: + :return: V2CreateResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_create_resource_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.resource_service_create_resource_with_http_info(**kwargs) # noqa: E501 + return data + + def resource_service_create_resource_with_http_info(self, **kwargs): # noqa: E501 + """CreateResource creates a new resource. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_create_resource_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str filename: + :param str external_link: + :param str type: + :param int memo_id: + :return: V2CreateResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['filename', 'external_link', 'type', 'memo_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_create_resource" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'filename' in params: + query_params.append(('filename', params['filename'])) # noqa: E501 + if 'external_link' in params: + query_params.append(('externalLink', params['external_link'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'memo_id' in params: + query_params.append(('memoId', params['memo_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateResourceResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resource_service_delete_resource(self, id, **kwargs): # noqa: E501 + """DeleteResource deletes a resource by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_delete_resource(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_delete_resource_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.resource_service_delete_resource_with_http_info(id, **kwargs) # noqa: E501 + return data + + def resource_service_delete_resource_with_http_info(self, id, **kwargs): # noqa: E501 + """DeleteResource deletes a resource by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_delete_resource_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_delete_resource" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `resource_service_delete_resource`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteResourceResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resource_service_get_resource(self, id, **kwargs): # noqa: E501 + """GetResource returns a resource by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_get_resource(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_get_resource_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.resource_service_get_resource_with_http_info(id, **kwargs) # noqa: E501 + return data + + def resource_service_get_resource_with_http_info(self, id, **kwargs): # noqa: E501 + """GetResource returns a resource by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_get_resource_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_get_resource" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `resource_service_get_resource`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetResourceResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resource_service_get_resource_by_name(self, name, **kwargs): # noqa: E501 + """GetResourceByName returns a resource by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_get_resource_by_name(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: V2GetResourceByNameResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_get_resource_by_name_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.resource_service_get_resource_by_name_with_http_info(name, **kwargs) # noqa: E501 + return data + + def resource_service_get_resource_by_name_with_http_info(self, name, **kwargs): # noqa: E501 + """GetResourceByName returns a resource by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_get_resource_by_name_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: V2GetResourceByNameResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_get_resource_by_name" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `resource_service_get_resource_by_name`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources/name/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetResourceByNameResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resource_service_list_resources(self, **kwargs): # noqa: E501 + """ListResources lists all resources. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_list_resources(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2ListResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_list_resources_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.resource_service_list_resources_with_http_info(**kwargs) # noqa: E501 + return data + + def resource_service_list_resources_with_http_info(self, **kwargs): # noqa: E501 + """ListResources lists all resources. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_list_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2ListResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_list_resources" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListResourcesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resource_service_update_resource(self, body, resource_id, **kwargs): # noqa: E501 + """UpdateResource updates a resource. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_update_resource(body, resource_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ResourcesResourceIdBody body: (required) + :param int resource_id: id is the system generated unique identifier. (required) + :return: V2UpdateResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resource_service_update_resource_with_http_info(body, resource_id, **kwargs) # noqa: E501 + else: + (data) = self.resource_service_update_resource_with_http_info(body, resource_id, **kwargs) # noqa: E501 + return data + + def resource_service_update_resource_with_http_info(self, body, resource_id, **kwargs): # noqa: E501 + """UpdateResource updates a resource. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resource_service_update_resource_with_http_info(body, resource_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ResourcesResourceIdBody body: (required) + :param int resource_id: id is the system generated unique identifier. (required) + :return: V2UpdateResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'resource_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resource_service_update_resource" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `resource_service_update_resource`") # noqa: E501 + # verify the required parameter 'resource_id' is set + if ('resource_id' not in params or + params['resource_id'] is None): + raise ValueError("Missing the required parameter `resource_id` when calling `resource_service_update_resource`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'resource_id' in params: + path_params['resource.id'] = params['resource_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/resources/{resource.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateResourceResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/tag_service_api.py b/memos/api/tag_service_api.py new file mode 100644 index 0000000..4f2ceb8 --- /dev/null +++ b/memos/api/tag_service_api.py @@ -0,0 +1,575 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class TagServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def tag_service_batch_upsert_tag(self, **kwargs): # noqa: E501 + """BatchUpsertTag upserts multiple tags. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_batch_upsert_tag(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2BatchUpsertTagResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_batch_upsert_tag_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_batch_upsert_tag_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_batch_upsert_tag_with_http_info(self, **kwargs): # noqa: E501 + """BatchUpsertTag upserts multiple tags. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_batch_upsert_tag_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2BatchUpsertTagResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_batch_upsert_tag" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags:batchUpsert', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2BatchUpsertTagResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def tag_service_delete_tag(self, **kwargs): # noqa: E501 + """DeleteTag deletes a tag. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_delete_tag(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tag_name: + :param str tag_creator: The creator of tags. Format: users/{username} + :return: V2DeleteTagResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_delete_tag_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_delete_tag_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_delete_tag_with_http_info(self, **kwargs): # noqa: E501 + """DeleteTag deletes a tag. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_delete_tag_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tag_name: + :param str tag_creator: The creator of tags. Format: users/{username} + :return: V2DeleteTagResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tag_name', 'tag_creator'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_delete_tag" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'tag_name' in params: + query_params.append(('tag.name', params['tag_name'])) # noqa: E501 + if 'tag_creator' in params: + query_params.append(('tag.creator', params['tag_creator'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteTagResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def tag_service_get_tag_suggestions(self, **kwargs): # noqa: E501 + """GetTagSuggestions gets tag suggestions from the user's memos. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_get_tag_suggestions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :return: V2GetTagSuggestionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_get_tag_suggestions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_get_tag_suggestions_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_get_tag_suggestions_with_http_info(self, **kwargs): # noqa: E501 + """GetTagSuggestions gets tag suggestions from the user's memos. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_get_tag_suggestions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :return: V2GetTagSuggestionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_get_tag_suggestions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags/suggestion', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetTagSuggestionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def tag_service_list_tags(self, **kwargs): # noqa: E501 + """ListTags lists tags. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_list_tags(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :return: V2ListTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_list_tags_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_list_tags_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_list_tags_with_http_info(self, **kwargs): # noqa: E501 + """ListTags lists tags. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_list_tags_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :return: V2ListTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_list_tags" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListTagsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def tag_service_rename_tag(self, **kwargs): # noqa: E501 + """RenameTag renames a tag. All related memos will be updated. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_rename_tag(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :param str old_name: + :param str new_name: + :return: V2RenameTagResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_rename_tag_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_rename_tag_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_rename_tag_with_http_info(self, **kwargs): # noqa: E501 + """RenameTag renames a tag. All related memos will be updated. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_rename_tag_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: The creator of tags. Format: users/{username} + :param str old_name: + :param str new_name: + :return: V2RenameTagResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user', 'old_name', 'new_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_rename_tag" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'old_name' in params: + query_params.append(('oldName', params['old_name'])) # noqa: E501 + if 'new_name' in params: + query_params.append(('newName', params['new_name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags:rename', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2RenameTagResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def tag_service_upsert_tag(self, **kwargs): # noqa: E501 + """UpsertTag upserts a tag. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_upsert_tag(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: + :return: V2UpsertTagResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.tag_service_upsert_tag_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.tag_service_upsert_tag_with_http_info(**kwargs) # noqa: E501 + return data + + def tag_service_upsert_tag_with_http_info(self, **kwargs): # noqa: E501 + """UpsertTag upserts a tag. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.tag_service_upsert_tag_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: + :return: V2UpsertTagResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method tag_service_upsert_tag" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/tags', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpsertTagResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/user_service_api.py b/memos/api/user_service_api.py new file mode 100644 index 0000000..4cde456 --- /dev/null +++ b/memos/api/user_service_api.py @@ -0,0 +1,1003 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class UserServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def user_service_create_user(self, body, **kwargs): # noqa: E501 + """CreateUser creates a new user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_create_user(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2User body: (required) + :return: V2CreateUserResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_create_user_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_service_create_user_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_service_create_user_with_http_info(self, body, **kwargs): # noqa: E501 + """CreateUser creates a new user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_create_user_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2User body: (required) + :return: V2CreateUserResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_create_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_service_create_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateUserResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_create_user_access_token(self, body, name, **kwargs): # noqa: E501 + """CreateUserAccessToken creates a new access token for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_create_user_access_token(body, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserServiceCreateUserAccessTokenBody body: (required) + :param str name: The name of the user. Format: users/{username} (required) + :return: V2CreateUserAccessTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_create_user_access_token_with_http_info(body, name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_create_user_access_token_with_http_info(body, name, **kwargs) # noqa: E501 + return data + + def user_service_create_user_access_token_with_http_info(self, body, name, **kwargs): # noqa: E501 + """CreateUserAccessToken creates a new access token for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_create_user_access_token_with_http_info(body, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserServiceCreateUserAccessTokenBody body: (required) + :param str name: The name of the user. Format: users/{username} (required) + :return: V2CreateUserAccessTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_create_user_access_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_service_create_user_access_token`") # noqa: E501 + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_create_user_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}/access_tokens', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateUserAccessTokenResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_delete_user(self, name, **kwargs): # noqa: E501 + """DeleteUser deletes a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_delete_user(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2DeleteUserResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_delete_user_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_delete_user_with_http_info(name, **kwargs) # noqa: E501 + return data + + def user_service_delete_user_with_http_info(self, name, **kwargs): # noqa: E501 + """DeleteUser deletes a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_delete_user_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2DeleteUserResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_delete_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_delete_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteUserResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_delete_user_access_token(self, name, access_token, **kwargs): # noqa: E501 + """DeleteUserAccessToken deletes an access token for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_delete_user_access_token(name, access_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :param str access_token: access_token is the access token to delete. (required) + :return: V2DeleteUserAccessTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_delete_user_access_token_with_http_info(name, access_token, **kwargs) # noqa: E501 + else: + (data) = self.user_service_delete_user_access_token_with_http_info(name, access_token, **kwargs) # noqa: E501 + return data + + def user_service_delete_user_access_token_with_http_info(self, name, access_token, **kwargs): # noqa: E501 + """DeleteUserAccessToken deletes an access token for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_delete_user_access_token_with_http_info(name, access_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :param str access_token: access_token is the access token to delete. (required) + :return: V2DeleteUserAccessTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'access_token'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_delete_user_access_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_delete_user_access_token`") # noqa: E501 + # verify the required parameter 'access_token' is set + if ('access_token' not in params or + params['access_token'] is None): + raise ValueError("Missing the required parameter `access_token` when calling `user_service_delete_user_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'access_token' in params: + path_params['accessToken'] = params['access_token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}/access_tokens/{accessToken}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteUserAccessTokenResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_get_user(self, name, **kwargs): # noqa: E501 + """GetUser gets a user by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_get_user(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2GetUserResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_get_user_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_get_user_with_http_info(name, **kwargs) # noqa: E501 + return data + + def user_service_get_user_with_http_info(self, name, **kwargs): # noqa: E501 + """GetUser gets a user by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_get_user_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2GetUserResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_get_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_get_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetUserResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_get_user_setting(self, name, **kwargs): # noqa: E501 + """GetUserSetting gets the setting of a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_get_user_setting(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2GetUserSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_get_user_setting_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_get_user_setting_with_http_info(name, **kwargs) # noqa: E501 + return data + + def user_service_get_user_setting_with_http_info(self, name, **kwargs): # noqa: E501 + """GetUserSetting gets the setting of a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_get_user_setting_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2GetUserSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_get_user_setting" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_get_user_setting`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}/setting', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetUserSettingResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_list_user_access_tokens(self, name, **kwargs): # noqa: E501 + """ListUserAccessTokens returns a list of access tokens for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_list_user_access_tokens(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2ListUserAccessTokensResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_list_user_access_tokens_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_list_user_access_tokens_with_http_info(name, **kwargs) # noqa: E501 + return data + + def user_service_list_user_access_tokens_with_http_info(self, name, **kwargs): # noqa: E501 + """ListUserAccessTokens returns a list of access tokens for a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_list_user_access_tokens_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The name of the user. Format: users/{username} (required) + :return: V2ListUserAccessTokensResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_list_user_access_tokens" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `user_service_list_user_access_tokens`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{name}/access_tokens', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListUserAccessTokensResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_list_users(self, **kwargs): # noqa: E501 + """ListUsers returns a list of users. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_list_users(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2ListUsersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_list_users_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_service_list_users_with_http_info(**kwargs) # noqa: E501 + return data + + def user_service_list_users_with_http_info(self, **kwargs): # noqa: E501 + """ListUsers returns a list of users. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_list_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2ListUsersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_list_users" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListUsersResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_update_user(self, body, user_name, **kwargs): # noqa: E501 + """UpdateUser updates a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_update_user(body, user_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2UserNameBody body: (required) + :param str user_name: The name of the user. Format: users/{username} (required) + :return: V2UpdateUserResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_update_user_with_http_info(body, user_name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_update_user_with_http_info(body, user_name, **kwargs) # noqa: E501 + return data + + def user_service_update_user_with_http_info(self, body, user_name, **kwargs): # noqa: E501 + """UpdateUser updates a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_update_user_with_http_info(body, user_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2UserNameBody body: (required) + :param str user_name: The name of the user. Format: users/{username} (required) + :return: V2UpdateUserResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'user_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_update_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_service_update_user`") # noqa: E501 + # verify the required parameter 'user_name' is set + if ('user_name' not in params or + params['user_name'] is None): + raise ValueError("Missing the required parameter `user_name` when calling `user_service_update_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_name' in params: + path_params['user.name'] = params['user_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{user.name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateUserResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_service_update_user_setting(self, body, setting_name, **kwargs): # noqa: E501 + """UpdateUserSetting updates the setting of a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_update_user_setting(body, setting_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2SettingNameBody body: (required) + :param str setting_name: The name of the user. Format: users/{username} (required) + :return: V2UpdateUserSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_service_update_user_setting_with_http_info(body, setting_name, **kwargs) # noqa: E501 + else: + (data) = self.user_service_update_user_setting_with_http_info(body, setting_name, **kwargs) # noqa: E501 + return data + + def user_service_update_user_setting_with_http_info(self, body, setting_name, **kwargs): # noqa: E501 + """UpdateUserSetting updates the setting of a user. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_service_update_user_setting_with_http_info(body, setting_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2SettingNameBody body: (required) + :param str setting_name: The name of the user. Format: users/{username} (required) + :return: V2UpdateUserSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'setting_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_service_update_user_setting" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_service_update_user_setting`") # noqa: E501 + # verify the required parameter 'setting_name' is set + if ('setting_name' not in params or + params['setting_name'] is None): + raise ValueError("Missing the required parameter `setting_name` when calling `user_service_update_user_setting`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'setting_name' in params: + path_params['setting.name'] = params['setting_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/{setting.name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateUserSettingResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/webhook_service_api.py b/memos/api/webhook_service_api.py new file mode 100644 index 0000000..2a2152d --- /dev/null +++ b/memos/api/webhook_service_api.py @@ -0,0 +1,510 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class WebhookServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def webhook_service_create_webhook(self, body, **kwargs): # noqa: E501 + """CreateWebhook creates a new webhook. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_create_webhook(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2CreateWebhookRequest body: (required) + :return: V2CreateWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhook_service_create_webhook_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.webhook_service_create_webhook_with_http_info(body, **kwargs) # noqa: E501 + return data + + def webhook_service_create_webhook_with_http_info(self, body, **kwargs): # noqa: E501 + """CreateWebhook creates a new webhook. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_create_webhook_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V2CreateWebhookRequest body: (required) + :return: V2CreateWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhook_service_create_webhook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `webhook_service_create_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/webhooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2CreateWebhookResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhook_service_delete_webhook(self, id, **kwargs): # noqa: E501 + """DeleteWebhook deletes a webhook by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_delete_webhook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhook_service_delete_webhook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.webhook_service_delete_webhook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def webhook_service_delete_webhook_with_http_info(self, id, **kwargs): # noqa: E501 + """DeleteWebhook deletes a webhook by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_delete_webhook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2DeleteWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhook_service_delete_webhook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `webhook_service_delete_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/webhooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2DeleteWebhookResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhook_service_get_webhook(self, id, **kwargs): # noqa: E501 + """GetWebhook returns a webhook by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_get_webhook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhook_service_get_webhook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.webhook_service_get_webhook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def webhook_service_get_webhook_with_http_info(self, id, **kwargs): # noqa: E501 + """GetWebhook returns a webhook by id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_get_webhook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: V2GetWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhook_service_get_webhook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `webhook_service_get_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/webhooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetWebhookResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhook_service_list_webhooks(self, **kwargs): # noqa: E501 + """ListWebhooks returns a list of webhooks. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_list_webhooks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int creator_id: + :return: V2ListWebhooksResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhook_service_list_webhooks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.webhook_service_list_webhooks_with_http_info(**kwargs) # noqa: E501 + return data + + def webhook_service_list_webhooks_with_http_info(self, **kwargs): # noqa: E501 + """ListWebhooks returns a list of webhooks. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_list_webhooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int creator_id: + :return: V2ListWebhooksResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['creator_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhook_service_list_webhooks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'creator_id' in params: + query_params.append(('creatorId', params['creator_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/webhooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2ListWebhooksResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhook_service_update_webhook(self, body, webhook_id, **kwargs): # noqa: E501 + """UpdateWebhook updates a webhook. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_update_webhook(body, webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WebhooksWebhookIdBody body: (required) + :param int webhook_id: (required) + :return: V2UpdateWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhook_service_update_webhook_with_http_info(body, webhook_id, **kwargs) # noqa: E501 + else: + (data) = self.webhook_service_update_webhook_with_http_info(body, webhook_id, **kwargs) # noqa: E501 + return data + + def webhook_service_update_webhook_with_http_info(self, body, webhook_id, **kwargs): # noqa: E501 + """UpdateWebhook updates a webhook. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhook_service_update_webhook_with_http_info(body, webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WebhooksWebhookIdBody body: (required) + :param int webhook_id: (required) + :return: V2UpdateWebhookResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'webhook_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhook_service_update_webhook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `webhook_service_update_webhook`") # noqa: E501 + # verify the required parameter 'webhook_id' is set + if ('webhook_id' not in params or + params['webhook_id'] is None): + raise ValueError("Missing the required parameter `webhook_id` when calling `webhook_service_update_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in params: + path_params['webhook.id'] = params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/webhooks/{webhook.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2UpdateWebhookResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/workspace_service_api.py b/memos/api/workspace_service_api.py new file mode 100644 index 0000000..3f34f83 --- /dev/null +++ b/memos/api/workspace_service_api.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class WorkspaceServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def workspace_service_get_workspace_profile(self, **kwargs): # noqa: E501 + """GetWorkspaceProfile returns the workspace profile. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_service_get_workspace_profile(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2GetWorkspaceProfileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.workspace_service_get_workspace_profile_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.workspace_service_get_workspace_profile_with_http_info(**kwargs) # noqa: E501 + return data + + def workspace_service_get_workspace_profile_with_http_info(self, **kwargs): # noqa: E501 + """GetWorkspaceProfile returns the workspace profile. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_service_get_workspace_profile_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V2GetWorkspaceProfileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method workspace_service_get_workspace_profile" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/workspace/profile', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetWorkspaceProfileResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api/workspace_setting_service_api.py b/memos/api/workspace_setting_service_api.py new file mode 100644 index 0000000..7155a20 --- /dev/null +++ b/memos/api/workspace_setting_service_api.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from memos.api_client import ApiClient + + +class WorkspaceSettingServiceApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def workspace_setting_service_get_workspace_setting(self, name, **kwargs): # noqa: E501 + """GetWorkspaceSetting returns the setting by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_setting_service_get_workspace_setting(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The resource name of the workspace setting. Format: settings/{setting} (required) + :return: V2GetWorkspaceSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.workspace_setting_service_get_workspace_setting_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.workspace_setting_service_get_workspace_setting_with_http_info(name, **kwargs) # noqa: E501 + return data + + def workspace_setting_service_get_workspace_setting_with_http_info(self, name, **kwargs): # noqa: E501 + """GetWorkspaceSetting returns the setting by name. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_setting_service_get_workspace_setting_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: The resource name of the workspace setting. Format: settings/{setting} (required) + :return: V2GetWorkspaceSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method workspace_setting_service_get_workspace_setting" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `workspace_setting_service_get_workspace_setting`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/workspace/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2GetWorkspaceSettingResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def workspace_setting_service_set_workspace_setting(self, body, setting_name, **kwargs): # noqa: E501 + """SetWorkspaceSetting updates the setting. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_setting_service_set_workspace_setting(body, setting_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SettingIsTheSettingToUpdate_ body: setting is the setting to update. (required) + :param str setting_name: name is the name of the setting. Format: settings/{setting} (required) + :return: V2SetWorkspaceSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.workspace_setting_service_set_workspace_setting_with_http_info(body, setting_name, **kwargs) # noqa: E501 + else: + (data) = self.workspace_setting_service_set_workspace_setting_with_http_info(body, setting_name, **kwargs) # noqa: E501 + return data + + def workspace_setting_service_set_workspace_setting_with_http_info(self, body, setting_name, **kwargs): # noqa: E501 + """SetWorkspaceSetting updates the setting. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.workspace_setting_service_set_workspace_setting_with_http_info(body, setting_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SettingIsTheSettingToUpdate_ body: setting is the setting to update. (required) + :param str setting_name: name is the name of the setting. Format: settings/{setting} (required) + :return: V2SetWorkspaceSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'setting_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method workspace_setting_service_set_workspace_setting" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `workspace_setting_service_set_workspace_setting`") # noqa: E501 + # verify the required parameter 'setting_name' is set + if ('setting_name' not in params or + params['setting_name'] is None): + raise ValueError("Missing the required parameter `setting_name` when calling `workspace_setting_service_set_workspace_setting`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'setting_name' in params: + path_params['setting.name'] = params['setting_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/workspace/{setting.name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V2SetWorkspaceSettingResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/memos/api_client.py b/memos/api_client.py new file mode 100644 index 0000000..ce3db24 --- /dev/null +++ b/memos/api_client.py @@ -0,0 +1,632 @@ +# coding: utf-8 +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from memos.configuration import Configuration +import memos.models +from memos import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + + def __del__(self): + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(memos.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + response_data = response.data + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + else: + f.write(response_data) + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/memos/configuration.py b/memos/configuration.py new file mode 100644 index 0000000..7c593a3 --- /dev/null +++ b/memos/configuration.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "/" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("memos") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: version not set\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/memos/models/__init__.py b/memos/models/__init__.py new file mode 100644 index 0000000..f64dc5e --- /dev/null +++ b/memos/models/__init__.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +# flake8: noqa +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +# import models into model package +from memos.models.apiv2_activity_memo_comment_payload import Apiv2ActivityMemoCommentPayload +from memos.models.apiv2_activity_payload import Apiv2ActivityPayload +from memos.models.apiv2_activity_version_update_payload import Apiv2ActivityVersionUpdatePayload +from memos.models.apiv2_reaction import Apiv2Reaction +from memos.models.apiv2_reaction_type import Apiv2ReactionType +from memos.models.apiv2_row_status import Apiv2RowStatus +from memos.models.apiv2_user_setting import Apiv2UserSetting +from memos.models.apiv2_webhook import Apiv2Webhook +from memos.models.apiv2_workspace_general_setting import Apiv2WorkspaceGeneralSetting +from memos.models.apiv2_workspace_setting import Apiv2WorkspaceSetting +from memos.models.googlerpc_status import GooglerpcStatus +from memos.models.memo_service_set_memo_relations_body import MemoServiceSetMemoRelationsBody +from memos.models.memo_service_set_memo_resources_body import MemoServiceSetMemoResourcesBody +from memos.models.memos_memo_id_body import MemosMemoIdBody +from memos.models.protobuf_any import ProtobufAny +from memos.models.resources_resource_id_body import ResourcesResourceIdBody +from memos.models.setting_is_the_setting_to_update_ import SettingIsTheSettingToUpdate_ +from memos.models.user_role import UserRole +from memos.models.user_service_create_user_access_token_body import UserServiceCreateUserAccessTokenBody +from memos.models.v2_activity import V2Activity +from memos.models.v2_batch_upsert_tag_response import V2BatchUpsertTagResponse +from memos.models.v2_create_memo_comment_response import V2CreateMemoCommentResponse +from memos.models.v2_create_memo_request import V2CreateMemoRequest +from memos.models.v2_create_memo_response import V2CreateMemoResponse +from memos.models.v2_create_resource_response import V2CreateResourceResponse +from memos.models.v2_create_user_access_token_response import V2CreateUserAccessTokenResponse +from memos.models.v2_create_user_response import V2CreateUserResponse +from memos.models.v2_create_webhook_request import V2CreateWebhookRequest +from memos.models.v2_create_webhook_response import V2CreateWebhookResponse +from memos.models.v2_delete_inbox_response import V2DeleteInboxResponse +from memos.models.v2_delete_memo_reaction_response import V2DeleteMemoReactionResponse +from memos.models.v2_delete_memo_response import V2DeleteMemoResponse +from memos.models.v2_delete_resource_response import V2DeleteResourceResponse +from memos.models.v2_delete_tag_response import V2DeleteTagResponse +from memos.models.v2_delete_user_access_token_response import V2DeleteUserAccessTokenResponse +from memos.models.v2_delete_user_response import V2DeleteUserResponse +from memos.models.v2_delete_webhook_response import V2DeleteWebhookResponse +from memos.models.v2_export_memos_response import V2ExportMemosResponse +from memos.models.v2_get_activity_response import V2GetActivityResponse +from memos.models.v2_get_auth_status_response import V2GetAuthStatusResponse +from memos.models.v2_get_memo_by_name_response import V2GetMemoByNameResponse +from memos.models.v2_get_memo_response import V2GetMemoResponse +from memos.models.v2_get_resource_by_name_response import V2GetResourceByNameResponse +from memos.models.v2_get_resource_response import V2GetResourceResponse +from memos.models.v2_get_tag_suggestions_response import V2GetTagSuggestionsResponse +from memos.models.v2_get_user_memos_stats_response import V2GetUserMemosStatsResponse +from memos.models.v2_get_user_response import V2GetUserResponse +from memos.models.v2_get_user_setting_response import V2GetUserSettingResponse +from memos.models.v2_get_webhook_response import V2GetWebhookResponse +from memos.models.v2_get_workspace_profile_response import V2GetWorkspaceProfileResponse +from memos.models.v2_get_workspace_setting_response import V2GetWorkspaceSettingResponse +from memos.models.v2_inbox import V2Inbox +from memos.models.v2_inbox_name_body import V2InboxNameBody +from memos.models.v2_inbox_status import V2InboxStatus +from memos.models.v2_inbox_type import V2InboxType +from memos.models.v2_list_inboxes_response import V2ListInboxesResponse +from memos.models.v2_list_memo_comments_response import V2ListMemoCommentsResponse +from memos.models.v2_list_memo_reactions_response import V2ListMemoReactionsResponse +from memos.models.v2_list_memo_relations_response import V2ListMemoRelationsResponse +from memos.models.v2_list_memo_resources_response import V2ListMemoResourcesResponse +from memos.models.v2_list_memos_response import V2ListMemosResponse +from memos.models.v2_list_resources_response import V2ListResourcesResponse +from memos.models.v2_list_tags_response import V2ListTagsResponse +from memos.models.v2_list_user_access_tokens_response import V2ListUserAccessTokensResponse +from memos.models.v2_list_users_response import V2ListUsersResponse +from memos.models.v2_list_webhooks_response import V2ListWebhooksResponse +from memos.models.v2_memo import V2Memo +from memos.models.v2_memo_relation import V2MemoRelation +from memos.models.v2_memo_relation_type import V2MemoRelationType +from memos.models.v2_rename_tag_response import V2RenameTagResponse +from memos.models.v2_resource import V2Resource +from memos.models.v2_set_memo_relations_response import V2SetMemoRelationsResponse +from memos.models.v2_set_memo_resources_response import V2SetMemoResourcesResponse +from memos.models.v2_set_workspace_setting_response import V2SetWorkspaceSettingResponse +from memos.models.v2_setting_name_body import V2SettingNameBody +from memos.models.v2_sign_in_response import V2SignInResponse +from memos.models.v2_sign_in_with_sso_response import V2SignInWithSSOResponse +from memos.models.v2_sign_out_response import V2SignOutResponse +from memos.models.v2_sign_up_response import V2SignUpResponse +from memos.models.v2_tag import V2Tag +from memos.models.v2_update_inbox_response import V2UpdateInboxResponse +from memos.models.v2_update_memo_response import V2UpdateMemoResponse +from memos.models.v2_update_resource_response import V2UpdateResourceResponse +from memos.models.v2_update_user_response import V2UpdateUserResponse +from memos.models.v2_update_user_setting_response import V2UpdateUserSettingResponse +from memos.models.v2_update_webhook_response import V2UpdateWebhookResponse +from memos.models.v2_upsert_memo_reaction_response import V2UpsertMemoReactionResponse +from memos.models.v2_upsert_tag_request import V2UpsertTagRequest +from memos.models.v2_upsert_tag_response import V2UpsertTagResponse +from memos.models.v2_user import V2User +from memos.models.v2_user_access_token import V2UserAccessToken +from memos.models.v2_user_name_body import V2UserNameBody +from memos.models.v2_visibility import V2Visibility +from memos.models.v2_workspace_profile import V2WorkspaceProfile +from memos.models.webhooks_webhook_id_body import WebhooksWebhookIdBody diff --git a/memos/models/apiv2_activity_memo_comment_payload.py b/memos/models/apiv2_activity_memo_comment_payload.py new file mode 100644 index 0000000..6acc550 --- /dev/null +++ b/memos/models/apiv2_activity_memo_comment_payload.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2ActivityMemoCommentPayload(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo_id': 'int', + 'related_memo_id': 'int' + } + + attribute_map = { + 'memo_id': 'memoId', + 'related_memo_id': 'relatedMemoId' + } + + def __init__(self, memo_id=None, related_memo_id=None): # noqa: E501 + """Apiv2ActivityMemoCommentPayload - a model defined in Swagger""" # noqa: E501 + self._memo_id = None + self._related_memo_id = None + self.discriminator = None + if memo_id is not None: + self.memo_id = memo_id + if related_memo_id is not None: + self.related_memo_id = related_memo_id + + @property + def memo_id(self): + """Gets the memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + + + :return: The memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + :rtype: int + """ + return self._memo_id + + @memo_id.setter + def memo_id(self, memo_id): + """Sets the memo_id of this Apiv2ActivityMemoCommentPayload. + + + :param memo_id: The memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + :type: int + """ + + self._memo_id = memo_id + + @property + def related_memo_id(self): + """Gets the related_memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + + + :return: The related_memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + :rtype: int + """ + return self._related_memo_id + + @related_memo_id.setter + def related_memo_id(self, related_memo_id): + """Sets the related_memo_id of this Apiv2ActivityMemoCommentPayload. + + + :param related_memo_id: The related_memo_id of this Apiv2ActivityMemoCommentPayload. # noqa: E501 + :type: int + """ + + self._related_memo_id = related_memo_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2ActivityMemoCommentPayload, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2ActivityMemoCommentPayload): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_activity_payload.py b/memos/models/apiv2_activity_payload.py new file mode 100644 index 0000000..405f344 --- /dev/null +++ b/memos/models/apiv2_activity_payload.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2ActivityPayload(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo_comment': 'Apiv2ActivityMemoCommentPayload', + 'version_update': 'Apiv2ActivityVersionUpdatePayload' + } + + attribute_map = { + 'memo_comment': 'memoComment', + 'version_update': 'versionUpdate' + } + + def __init__(self, memo_comment=None, version_update=None): # noqa: E501 + """Apiv2ActivityPayload - a model defined in Swagger""" # noqa: E501 + self._memo_comment = None + self._version_update = None + self.discriminator = None + if memo_comment is not None: + self.memo_comment = memo_comment + if version_update is not None: + self.version_update = version_update + + @property + def memo_comment(self): + """Gets the memo_comment of this Apiv2ActivityPayload. # noqa: E501 + + + :return: The memo_comment of this Apiv2ActivityPayload. # noqa: E501 + :rtype: Apiv2ActivityMemoCommentPayload + """ + return self._memo_comment + + @memo_comment.setter + def memo_comment(self, memo_comment): + """Sets the memo_comment of this Apiv2ActivityPayload. + + + :param memo_comment: The memo_comment of this Apiv2ActivityPayload. # noqa: E501 + :type: Apiv2ActivityMemoCommentPayload + """ + + self._memo_comment = memo_comment + + @property + def version_update(self): + """Gets the version_update of this Apiv2ActivityPayload. # noqa: E501 + + + :return: The version_update of this Apiv2ActivityPayload. # noqa: E501 + :rtype: Apiv2ActivityVersionUpdatePayload + """ + return self._version_update + + @version_update.setter + def version_update(self, version_update): + """Sets the version_update of this Apiv2ActivityPayload. + + + :param version_update: The version_update of this Apiv2ActivityPayload. # noqa: E501 + :type: Apiv2ActivityVersionUpdatePayload + """ + + self._version_update = version_update + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2ActivityPayload, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2ActivityPayload): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_activity_version_update_payload.py b/memos/models/apiv2_activity_version_update_payload.py new file mode 100644 index 0000000..8c7b9d2 --- /dev/null +++ b/memos/models/apiv2_activity_version_update_payload.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2ActivityVersionUpdatePayload(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'version': 'str' + } + + attribute_map = { + 'version': 'version' + } + + def __init__(self, version=None): # noqa: E501 + """Apiv2ActivityVersionUpdatePayload - a model defined in Swagger""" # noqa: E501 + self._version = None + self.discriminator = None + if version is not None: + self.version = version + + @property + def version(self): + """Gets the version of this Apiv2ActivityVersionUpdatePayload. # noqa: E501 + + + :return: The version of this Apiv2ActivityVersionUpdatePayload. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this Apiv2ActivityVersionUpdatePayload. + + + :param version: The version of this Apiv2ActivityVersionUpdatePayload. # noqa: E501 + :type: str + """ + + self._version = version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2ActivityVersionUpdatePayload, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2ActivityVersionUpdatePayload): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_reaction.py b/memos/models/apiv2_reaction.py new file mode 100644 index 0000000..7013141 --- /dev/null +++ b/memos/models/apiv2_reaction.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2Reaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'creator': 'str', + 'content_id': 'str', + 'reaction_type': 'Apiv2ReactionType' + } + + attribute_map = { + 'id': 'id', + 'creator': 'creator', + 'content_id': 'contentId', + 'reaction_type': 'reactionType' + } + + def __init__(self, id=None, creator=None, content_id=None, reaction_type=None): # noqa: E501 + """Apiv2Reaction - a model defined in Swagger""" # noqa: E501 + self._id = None + self._creator = None + self._content_id = None + self._reaction_type = None + self.discriminator = None + if id is not None: + self.id = id + if creator is not None: + self.creator = creator + if content_id is not None: + self.content_id = content_id + if reaction_type is not None: + self.reaction_type = reaction_type + + @property + def id(self): + """Gets the id of this Apiv2Reaction. # noqa: E501 + + + :return: The id of this Apiv2Reaction. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Apiv2Reaction. + + + :param id: The id of this Apiv2Reaction. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def creator(self): + """Gets the creator of this Apiv2Reaction. # noqa: E501 + + + :return: The creator of this Apiv2Reaction. # noqa: E501 + :rtype: str + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Apiv2Reaction. + + + :param creator: The creator of this Apiv2Reaction. # noqa: E501 + :type: str + """ + + self._creator = creator + + @property + def content_id(self): + """Gets the content_id of this Apiv2Reaction. # noqa: E501 + + + :return: The content_id of this Apiv2Reaction. # noqa: E501 + :rtype: str + """ + return self._content_id + + @content_id.setter + def content_id(self, content_id): + """Sets the content_id of this Apiv2Reaction. + + + :param content_id: The content_id of this Apiv2Reaction. # noqa: E501 + :type: str + """ + + self._content_id = content_id + + @property + def reaction_type(self): + """Gets the reaction_type of this Apiv2Reaction. # noqa: E501 + + + :return: The reaction_type of this Apiv2Reaction. # noqa: E501 + :rtype: Apiv2ReactionType + """ + return self._reaction_type + + @reaction_type.setter + def reaction_type(self, reaction_type): + """Sets the reaction_type of this Apiv2Reaction. + + + :param reaction_type: The reaction_type of this Apiv2Reaction. # noqa: E501 + :type: Apiv2ReactionType + """ + + self._reaction_type = reaction_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2Reaction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2Reaction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_reaction_type.py b/memos/models/apiv2_reaction_type.py new file mode 100644 index 0000000..c12c00f --- /dev/null +++ b/memos/models/apiv2_reaction_type.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2ReactionType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED" + THUMBS_UP = "THUMBS_UP" + THUMBS_DOWN = "THUMBS_DOWN" + HEART = "HEART" + FIRE = "FIRE" + CLAPPING_HANDS = "CLAPPING_HANDS" + LAUGH = "LAUGH" + OK_HAND = "OK_HAND" + ROCKET = "ROCKET" + EYES = "EYES" + THINKING_FACE = "THINKING_FACE" + CLOWN_FACE = "CLOWN_FACE" + QUESTION_MARK = "QUESTION_MARK" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """Apiv2ReactionType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2ReactionType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2ReactionType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_row_status.py b/memos/models/apiv2_row_status.py new file mode 100644 index 0000000..cd7eda3 --- /dev/null +++ b/memos/models/apiv2_row_status.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2RowStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ROW_STATUS_UNSPECIFIED = "ROW_STATUS_UNSPECIFIED" + ACTIVE = "ACTIVE" + ARCHIVED = "ARCHIVED" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """Apiv2RowStatus - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2RowStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2RowStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_user_setting.py b/memos/models/apiv2_user_setting.py new file mode 100644 index 0000000..7f95f4e --- /dev/null +++ b/memos/models/apiv2_user_setting.py @@ -0,0 +1,222 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2UserSetting(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'locale': 'str', + 'appearance': 'str', + 'memo_visibility': 'str', + 'telegram_user_id': 'str' + } + + attribute_map = { + 'name': 'name', + 'locale': 'locale', + 'appearance': 'appearance', + 'memo_visibility': 'memoVisibility', + 'telegram_user_id': 'telegramUserId' + } + + def __init__(self, name=None, locale=None, appearance=None, memo_visibility=None, telegram_user_id=None): # noqa: E501 + """Apiv2UserSetting - a model defined in Swagger""" # noqa: E501 + self._name = None + self._locale = None + self._appearance = None + self._memo_visibility = None + self._telegram_user_id = None + self.discriminator = None + if name is not None: + self.name = name + if locale is not None: + self.locale = locale + if appearance is not None: + self.appearance = appearance + if memo_visibility is not None: + self.memo_visibility = memo_visibility + if telegram_user_id is not None: + self.telegram_user_id = telegram_user_id + + @property + def name(self): + """Gets the name of this Apiv2UserSetting. # noqa: E501 + + + :return: The name of this Apiv2UserSetting. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Apiv2UserSetting. + + + :param name: The name of this Apiv2UserSetting. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def locale(self): + """Gets the locale of this Apiv2UserSetting. # noqa: E501 + + The preferred locale of the user. # noqa: E501 + + :return: The locale of this Apiv2UserSetting. # noqa: E501 + :rtype: str + """ + return self._locale + + @locale.setter + def locale(self, locale): + """Sets the locale of this Apiv2UserSetting. + + The preferred locale of the user. # noqa: E501 + + :param locale: The locale of this Apiv2UserSetting. # noqa: E501 + :type: str + """ + + self._locale = locale + + @property + def appearance(self): + """Gets the appearance of this Apiv2UserSetting. # noqa: E501 + + The preferred appearance of the user. # noqa: E501 + + :return: The appearance of this Apiv2UserSetting. # noqa: E501 + :rtype: str + """ + return self._appearance + + @appearance.setter + def appearance(self, appearance): + """Sets the appearance of this Apiv2UserSetting. + + The preferred appearance of the user. # noqa: E501 + + :param appearance: The appearance of this Apiv2UserSetting. # noqa: E501 + :type: str + """ + + self._appearance = appearance + + @property + def memo_visibility(self): + """Gets the memo_visibility of this Apiv2UserSetting. # noqa: E501 + + The default visibility of the memo. # noqa: E501 + + :return: The memo_visibility of this Apiv2UserSetting. # noqa: E501 + :rtype: str + """ + return self._memo_visibility + + @memo_visibility.setter + def memo_visibility(self, memo_visibility): + """Sets the memo_visibility of this Apiv2UserSetting. + + The default visibility of the memo. # noqa: E501 + + :param memo_visibility: The memo_visibility of this Apiv2UserSetting. # noqa: E501 + :type: str + """ + + self._memo_visibility = memo_visibility + + @property + def telegram_user_id(self): + """Gets the telegram_user_id of this Apiv2UserSetting. # noqa: E501 + + The telegram user id of the user. # noqa: E501 + + :return: The telegram_user_id of this Apiv2UserSetting. # noqa: E501 + :rtype: str + """ + return self._telegram_user_id + + @telegram_user_id.setter + def telegram_user_id(self, telegram_user_id): + """Sets the telegram_user_id of this Apiv2UserSetting. + + The telegram user id of the user. # noqa: E501 + + :param telegram_user_id: The telegram_user_id of this Apiv2UserSetting. # noqa: E501 + :type: str + """ + + self._telegram_user_id = telegram_user_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2UserSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2UserSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_webhook.py b/memos/models/apiv2_webhook.py new file mode 100644 index 0000000..9bec9f8 --- /dev/null +++ b/memos/models/apiv2_webhook.py @@ -0,0 +1,266 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2Webhook(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'creator_id': 'int', + 'created_time': 'datetime', + 'updated_time': 'datetime', + 'row_status': 'Apiv2RowStatus', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'id': 'id', + 'creator_id': 'creatorId', + 'created_time': 'createdTime', + 'updated_time': 'updatedTime', + 'row_status': 'rowStatus', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, id=None, creator_id=None, created_time=None, updated_time=None, row_status=None, name=None, url=None): # noqa: E501 + """Apiv2Webhook - a model defined in Swagger""" # noqa: E501 + self._id = None + self._creator_id = None + self._created_time = None + self._updated_time = None + self._row_status = None + self._name = None + self._url = None + self.discriminator = None + if id is not None: + self.id = id + if creator_id is not None: + self.creator_id = creator_id + if created_time is not None: + self.created_time = created_time + if updated_time is not None: + self.updated_time = updated_time + if row_status is not None: + self.row_status = row_status + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def id(self): + """Gets the id of this Apiv2Webhook. # noqa: E501 + + + :return: The id of this Apiv2Webhook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Apiv2Webhook. + + + :param id: The id of this Apiv2Webhook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def creator_id(self): + """Gets the creator_id of this Apiv2Webhook. # noqa: E501 + + + :return: The creator_id of this Apiv2Webhook. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this Apiv2Webhook. + + + :param creator_id: The creator_id of this Apiv2Webhook. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def created_time(self): + """Gets the created_time of this Apiv2Webhook. # noqa: E501 + + + :return: The created_time of this Apiv2Webhook. # noqa: E501 + :rtype: datetime + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Apiv2Webhook. + + + :param created_time: The created_time of this Apiv2Webhook. # noqa: E501 + :type: datetime + """ + + self._created_time = created_time + + @property + def updated_time(self): + """Gets the updated_time of this Apiv2Webhook. # noqa: E501 + + + :return: The updated_time of this Apiv2Webhook. # noqa: E501 + :rtype: datetime + """ + return self._updated_time + + @updated_time.setter + def updated_time(self, updated_time): + """Sets the updated_time of this Apiv2Webhook. + + + :param updated_time: The updated_time of this Apiv2Webhook. # noqa: E501 + :type: datetime + """ + + self._updated_time = updated_time + + @property + def row_status(self): + """Gets the row_status of this Apiv2Webhook. # noqa: E501 + + + :return: The row_status of this Apiv2Webhook. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this Apiv2Webhook. + + + :param row_status: The row_status of this Apiv2Webhook. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def name(self): + """Gets the name of this Apiv2Webhook. # noqa: E501 + + + :return: The name of this Apiv2Webhook. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Apiv2Webhook. + + + :param name: The name of this Apiv2Webhook. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this Apiv2Webhook. # noqa: E501 + + + :return: The url of this Apiv2Webhook. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Apiv2Webhook. + + + :param url: The url of this Apiv2Webhook. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2Webhook, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2Webhook): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_workspace_general_setting.py b/memos/models/apiv2_workspace_general_setting.py new file mode 100644 index 0000000..06b51c2 --- /dev/null +++ b/memos/models/apiv2_workspace_general_setting.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2WorkspaceGeneralSetting(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'instance_url': 'str', + 'disallow_signup': 'bool', + 'disallow_password_login': 'bool', + 'additional_script': 'str', + 'additional_style': 'str' + } + + attribute_map = { + 'instance_url': 'instanceUrl', + 'disallow_signup': 'disallowSignup', + 'disallow_password_login': 'disallowPasswordLogin', + 'additional_script': 'additionalScript', + 'additional_style': 'additionalStyle' + } + + def __init__(self, instance_url=None, disallow_signup=None, disallow_password_login=None, additional_script=None, additional_style=None): # noqa: E501 + """Apiv2WorkspaceGeneralSetting - a model defined in Swagger""" # noqa: E501 + self._instance_url = None + self._disallow_signup = None + self._disallow_password_login = None + self._additional_script = None + self._additional_style = None + self.discriminator = None + if instance_url is not None: + self.instance_url = instance_url + if disallow_signup is not None: + self.disallow_signup = disallow_signup + if disallow_password_login is not None: + self.disallow_password_login = disallow_password_login + if additional_script is not None: + self.additional_script = additional_script + if additional_style is not None: + self.additional_style = additional_style + + @property + def instance_url(self): + """Gets the instance_url of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + + instance_url is the instance URL. # noqa: E501 + + :return: The instance_url of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :rtype: str + """ + return self._instance_url + + @instance_url.setter + def instance_url(self, instance_url): + """Sets the instance_url of this Apiv2WorkspaceGeneralSetting. + + instance_url is the instance URL. # noqa: E501 + + :param instance_url: The instance_url of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :type: str + """ + + self._instance_url = instance_url + + @property + def disallow_signup(self): + """Gets the disallow_signup of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + + disallow_signup is the flag to disallow signup. # noqa: E501 + + :return: The disallow_signup of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :rtype: bool + """ + return self._disallow_signup + + @disallow_signup.setter + def disallow_signup(self, disallow_signup): + """Sets the disallow_signup of this Apiv2WorkspaceGeneralSetting. + + disallow_signup is the flag to disallow signup. # noqa: E501 + + :param disallow_signup: The disallow_signup of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :type: bool + """ + + self._disallow_signup = disallow_signup + + @property + def disallow_password_login(self): + """Gets the disallow_password_login of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + + disallow_password_login is the flag to disallow password login. # noqa: E501 + + :return: The disallow_password_login of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :rtype: bool + """ + return self._disallow_password_login + + @disallow_password_login.setter + def disallow_password_login(self, disallow_password_login): + """Sets the disallow_password_login of this Apiv2WorkspaceGeneralSetting. + + disallow_password_login is the flag to disallow password login. # noqa: E501 + + :param disallow_password_login: The disallow_password_login of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :type: bool + """ + + self._disallow_password_login = disallow_password_login + + @property + def additional_script(self): + """Gets the additional_script of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + + additional_script is the additional script. # noqa: E501 + + :return: The additional_script of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :rtype: str + """ + return self._additional_script + + @additional_script.setter + def additional_script(self, additional_script): + """Sets the additional_script of this Apiv2WorkspaceGeneralSetting. + + additional_script is the additional script. # noqa: E501 + + :param additional_script: The additional_script of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :type: str + """ + + self._additional_script = additional_script + + @property + def additional_style(self): + """Gets the additional_style of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + + additional_style is the additional style. # noqa: E501 + + :return: The additional_style of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :rtype: str + """ + return self._additional_style + + @additional_style.setter + def additional_style(self, additional_style): + """Sets the additional_style of this Apiv2WorkspaceGeneralSetting. + + additional_style is the additional style. # noqa: E501 + + :param additional_style: The additional_style of this Apiv2WorkspaceGeneralSetting. # noqa: E501 + :type: str + """ + + self._additional_style = additional_style + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2WorkspaceGeneralSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2WorkspaceGeneralSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/apiv2_workspace_setting.py b/memos/models/apiv2_workspace_setting.py new file mode 100644 index 0000000..63a33e0 --- /dev/null +++ b/memos/models/apiv2_workspace_setting.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Apiv2WorkspaceSetting(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'general_setting': 'Apiv2WorkspaceGeneralSetting' + } + + attribute_map = { + 'name': 'name', + 'general_setting': 'generalSetting' + } + + def __init__(self, name=None, general_setting=None): # noqa: E501 + """Apiv2WorkspaceSetting - a model defined in Swagger""" # noqa: E501 + self._name = None + self._general_setting = None + self.discriminator = None + if name is not None: + self.name = name + if general_setting is not None: + self.general_setting = general_setting + + @property + def name(self): + """Gets the name of this Apiv2WorkspaceSetting. # noqa: E501 + + + :return: The name of this Apiv2WorkspaceSetting. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Apiv2WorkspaceSetting. + + + :param name: The name of this Apiv2WorkspaceSetting. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def general_setting(self): + """Gets the general_setting of this Apiv2WorkspaceSetting. # noqa: E501 + + + :return: The general_setting of this Apiv2WorkspaceSetting. # noqa: E501 + :rtype: Apiv2WorkspaceGeneralSetting + """ + return self._general_setting + + @general_setting.setter + def general_setting(self, general_setting): + """Sets the general_setting of this Apiv2WorkspaceSetting. + + + :param general_setting: The general_setting of this Apiv2WorkspaceSetting. # noqa: E501 + :type: Apiv2WorkspaceGeneralSetting + """ + + self._general_setting = general_setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Apiv2WorkspaceSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Apiv2WorkspaceSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/googlerpc_status.py b/memos/models/googlerpc_status.py new file mode 100644 index 0000000..b23ceb7 --- /dev/null +++ b/memos/models/googlerpc_status.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class GooglerpcStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'code': 'int', + 'message': 'str', + 'details': 'list[ProtobufAny]' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'details': 'details' + } + + def __init__(self, code=None, message=None, details=None): # noqa: E501 + """GooglerpcStatus - a model defined in Swagger""" # noqa: E501 + self._code = None + self._message = None + self._details = None + self.discriminator = None + if code is not None: + self.code = code + if message is not None: + self.message = message + if details is not None: + self.details = details + + @property + def code(self): + """Gets the code of this GooglerpcStatus. # noqa: E501 + + + :return: The code of this GooglerpcStatus. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this GooglerpcStatus. + + + :param code: The code of this GooglerpcStatus. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this GooglerpcStatus. # noqa: E501 + + + :return: The message of this GooglerpcStatus. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this GooglerpcStatus. + + + :param message: The message of this GooglerpcStatus. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def details(self): + """Gets the details of this GooglerpcStatus. # noqa: E501 + + + :return: The details of this GooglerpcStatus. # noqa: E501 + :rtype: list[ProtobufAny] + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this GooglerpcStatus. + + + :param details: The details of this GooglerpcStatus. # noqa: E501 + :type: list[ProtobufAny] + """ + + self._details = details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GooglerpcStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GooglerpcStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/memo_service_set_memo_relations_body.py b/memos/models/memo_service_set_memo_relations_body.py new file mode 100644 index 0000000..7227b3c --- /dev/null +++ b/memos/models/memo_service_set_memo_relations_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class MemoServiceSetMemoRelationsBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'relations': 'list[V2MemoRelation]' + } + + attribute_map = { + 'relations': 'relations' + } + + def __init__(self, relations=None): # noqa: E501 + """MemoServiceSetMemoRelationsBody - a model defined in Swagger""" # noqa: E501 + self._relations = None + self.discriminator = None + if relations is not None: + self.relations = relations + + @property + def relations(self): + """Gets the relations of this MemoServiceSetMemoRelationsBody. # noqa: E501 + + + :return: The relations of this MemoServiceSetMemoRelationsBody. # noqa: E501 + :rtype: list[V2MemoRelation] + """ + return self._relations + + @relations.setter + def relations(self, relations): + """Sets the relations of this MemoServiceSetMemoRelationsBody. + + + :param relations: The relations of this MemoServiceSetMemoRelationsBody. # noqa: E501 + :type: list[V2MemoRelation] + """ + + self._relations = relations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MemoServiceSetMemoRelationsBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MemoServiceSetMemoRelationsBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/memo_service_set_memo_resources_body.py b/memos/models/memo_service_set_memo_resources_body.py new file mode 100644 index 0000000..f6c5d95 --- /dev/null +++ b/memos/models/memo_service_set_memo_resources_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class MemoServiceSetMemoResourcesBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resources': 'list[V2Resource]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None): # noqa: E501 + """MemoServiceSetMemoResourcesBody - a model defined in Swagger""" # noqa: E501 + self._resources = None + self.discriminator = None + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this MemoServiceSetMemoResourcesBody. # noqa: E501 + + + :return: The resources of this MemoServiceSetMemoResourcesBody. # noqa: E501 + :rtype: list[V2Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this MemoServiceSetMemoResourcesBody. + + + :param resources: The resources of this MemoServiceSetMemoResourcesBody. # noqa: E501 + :type: list[V2Resource] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MemoServiceSetMemoResourcesBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MemoServiceSetMemoResourcesBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/memos_memo_id_body.py b/memos/models/memos_memo_id_body.py new file mode 100644 index 0000000..eb3cfcc --- /dev/null +++ b/memos/models/memos_memo_id_body.py @@ -0,0 +1,450 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class MemosMemoIdBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'row_status': 'Apiv2RowStatus', + 'creator': 'str', + 'creator_id': 'int', + 'create_time': 'datetime', + 'update_time': 'datetime', + 'display_time': 'datetime', + 'content': 'str', + 'visibility': 'V2Visibility', + 'pinned': 'bool', + 'parent_id': 'int', + 'resources': 'list[V2Resource]', + 'relations': 'list[V2MemoRelation]', + 'reactions': 'list[Apiv2Reaction]' + } + + attribute_map = { + 'name': 'name', + 'row_status': 'rowStatus', + 'creator': 'creator', + 'creator_id': 'creatorId', + 'create_time': 'createTime', + 'update_time': 'updateTime', + 'display_time': 'displayTime', + 'content': 'content', + 'visibility': 'visibility', + 'pinned': 'pinned', + 'parent_id': 'parentId', + 'resources': 'resources', + 'relations': 'relations', + 'reactions': 'reactions' + } + + def __init__(self, name=None, row_status=None, creator=None, creator_id=None, create_time=None, update_time=None, display_time=None, content=None, visibility=None, pinned=None, parent_id=None, resources=None, relations=None, reactions=None): # noqa: E501 + """MemosMemoIdBody - a model defined in Swagger""" # noqa: E501 + self._name = None + self._row_status = None + self._creator = None + self._creator_id = None + self._create_time = None + self._update_time = None + self._display_time = None + self._content = None + self._visibility = None + self._pinned = None + self._parent_id = None + self._resources = None + self._relations = None + self._reactions = None + self.discriminator = None + if name is not None: + self.name = name + if row_status is not None: + self.row_status = row_status + if creator is not None: + self.creator = creator + if creator_id is not None: + self.creator_id = creator_id + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + if display_time is not None: + self.display_time = display_time + if content is not None: + self.content = content + if visibility is not None: + self.visibility = visibility + if pinned is not None: + self.pinned = pinned + if parent_id is not None: + self.parent_id = parent_id + if resources is not None: + self.resources = resources + if relations is not None: + self.relations = relations + if reactions is not None: + self.reactions = reactions + + @property + def name(self): + """Gets the name of this MemosMemoIdBody. # noqa: E501 + + name is the user provided name. # noqa: E501 + + :return: The name of this MemosMemoIdBody. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this MemosMemoIdBody. + + name is the user provided name. # noqa: E501 + + :param name: The name of this MemosMemoIdBody. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def row_status(self): + """Gets the row_status of this MemosMemoIdBody. # noqa: E501 + + + :return: The row_status of this MemosMemoIdBody. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this MemosMemoIdBody. + + + :param row_status: The row_status of this MemosMemoIdBody. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def creator(self): + """Gets the creator of this MemosMemoIdBody. # noqa: E501 + + + :return: The creator of this MemosMemoIdBody. # noqa: E501 + :rtype: str + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this MemosMemoIdBody. + + + :param creator: The creator of this MemosMemoIdBody. # noqa: E501 + :type: str + """ + + self._creator = creator + + @property + def creator_id(self): + """Gets the creator_id of this MemosMemoIdBody. # noqa: E501 + + + :return: The creator_id of this MemosMemoIdBody. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this MemosMemoIdBody. + + + :param creator_id: The creator_id of this MemosMemoIdBody. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def create_time(self): + """Gets the create_time of this MemosMemoIdBody. # noqa: E501 + + + :return: The create_time of this MemosMemoIdBody. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this MemosMemoIdBody. + + + :param create_time: The create_time of this MemosMemoIdBody. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this MemosMemoIdBody. # noqa: E501 + + + :return: The update_time of this MemosMemoIdBody. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this MemosMemoIdBody. + + + :param update_time: The update_time of this MemosMemoIdBody. # noqa: E501 + :type: datetime + """ + + self._update_time = update_time + + @property + def display_time(self): + """Gets the display_time of this MemosMemoIdBody. # noqa: E501 + + + :return: The display_time of this MemosMemoIdBody. # noqa: E501 + :rtype: datetime + """ + return self._display_time + + @display_time.setter + def display_time(self, display_time): + """Sets the display_time of this MemosMemoIdBody. + + + :param display_time: The display_time of this MemosMemoIdBody. # noqa: E501 + :type: datetime + """ + + self._display_time = display_time + + @property + def content(self): + """Gets the content of this MemosMemoIdBody. # noqa: E501 + + + :return: The content of this MemosMemoIdBody. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this MemosMemoIdBody. + + + :param content: The content of this MemosMemoIdBody. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def visibility(self): + """Gets the visibility of this MemosMemoIdBody. # noqa: E501 + + + :return: The visibility of this MemosMemoIdBody. # noqa: E501 + :rtype: V2Visibility + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this MemosMemoIdBody. + + + :param visibility: The visibility of this MemosMemoIdBody. # noqa: E501 + :type: V2Visibility + """ + + self._visibility = visibility + + @property + def pinned(self): + """Gets the pinned of this MemosMemoIdBody. # noqa: E501 + + + :return: The pinned of this MemosMemoIdBody. # noqa: E501 + :rtype: bool + """ + return self._pinned + + @pinned.setter + def pinned(self, pinned): + """Sets the pinned of this MemosMemoIdBody. + + + :param pinned: The pinned of this MemosMemoIdBody. # noqa: E501 + :type: bool + """ + + self._pinned = pinned + + @property + def parent_id(self): + """Gets the parent_id of this MemosMemoIdBody. # noqa: E501 + + + :return: The parent_id of this MemosMemoIdBody. # noqa: E501 + :rtype: int + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + """Sets the parent_id of this MemosMemoIdBody. + + + :param parent_id: The parent_id of this MemosMemoIdBody. # noqa: E501 + :type: int + """ + + self._parent_id = parent_id + + @property + def resources(self): + """Gets the resources of this MemosMemoIdBody. # noqa: E501 + + + :return: The resources of this MemosMemoIdBody. # noqa: E501 + :rtype: list[V2Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this MemosMemoIdBody. + + + :param resources: The resources of this MemosMemoIdBody. # noqa: E501 + :type: list[V2Resource] + """ + + self._resources = resources + + @property + def relations(self): + """Gets the relations of this MemosMemoIdBody. # noqa: E501 + + + :return: The relations of this MemosMemoIdBody. # noqa: E501 + :rtype: list[V2MemoRelation] + """ + return self._relations + + @relations.setter + def relations(self, relations): + """Sets the relations of this MemosMemoIdBody. + + + :param relations: The relations of this MemosMemoIdBody. # noqa: E501 + :type: list[V2MemoRelation] + """ + + self._relations = relations + + @property + def reactions(self): + """Gets the reactions of this MemosMemoIdBody. # noqa: E501 + + + :return: The reactions of this MemosMemoIdBody. # noqa: E501 + :rtype: list[Apiv2Reaction] + """ + return self._reactions + + @reactions.setter + def reactions(self, reactions): + """Sets the reactions of this MemosMemoIdBody. + + + :param reactions: The reactions of this MemosMemoIdBody. # noqa: E501 + :type: list[Apiv2Reaction] + """ + + self._reactions = reactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MemosMemoIdBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MemosMemoIdBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/protobuf_any.py b/memos/models/protobuf_any.py new file mode 100644 index 0000000..95219c9 --- /dev/null +++ b/memos/models/protobuf_any.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ProtobufAny(dict): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + if hasattr(dict, "swagger_types"): + swagger_types.update(dict.swagger_types) + + attribute_map = { + } + if hasattr(dict, "attribute_map"): + attribute_map.update(dict.attribute_map) + + def __init__(self, *args, **kwargs): # noqa: E501 + """ProtobufAny - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + dict.__init__(self, *args, **kwargs) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ProtobufAny, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProtobufAny): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/resources_resource_id_body.py b/memos/models/resources_resource_id_body.py new file mode 100644 index 0000000..cd6f188 --- /dev/null +++ b/memos/models/resources_resource_id_body.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ResourcesResourceIdBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'create_time': 'datetime', + 'filename': 'str', + 'external_link': 'str', + 'type': 'str', + 'size': 'str', + 'memo_id': 'int' + } + + attribute_map = { + 'name': 'name', + 'create_time': 'createTime', + 'filename': 'filename', + 'external_link': 'externalLink', + 'type': 'type', + 'size': 'size', + 'memo_id': 'memoId' + } + + def __init__(self, name=None, create_time=None, filename=None, external_link=None, type=None, size=None, memo_id=None): # noqa: E501 + """ResourcesResourceIdBody - a model defined in Swagger""" # noqa: E501 + self._name = None + self._create_time = None + self._filename = None + self._external_link = None + self._type = None + self._size = None + self._memo_id = None + self.discriminator = None + if name is not None: + self.name = name + if create_time is not None: + self.create_time = create_time + if filename is not None: + self.filename = filename + if external_link is not None: + self.external_link = external_link + if type is not None: + self.type = type + if size is not None: + self.size = size + if memo_id is not None: + self.memo_id = memo_id + + @property + def name(self): + """Gets the name of this ResourcesResourceIdBody. # noqa: E501 + + name is the user provided name. # noqa: E501 + + :return: The name of this ResourcesResourceIdBody. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ResourcesResourceIdBody. + + name is the user provided name. # noqa: E501 + + :param name: The name of this ResourcesResourceIdBody. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def create_time(self): + """Gets the create_time of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The create_time of this ResourcesResourceIdBody. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ResourcesResourceIdBody. + + + :param create_time: The create_time of this ResourcesResourceIdBody. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def filename(self): + """Gets the filename of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The filename of this ResourcesResourceIdBody. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this ResourcesResourceIdBody. + + + :param filename: The filename of this ResourcesResourceIdBody. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def external_link(self): + """Gets the external_link of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The external_link of this ResourcesResourceIdBody. # noqa: E501 + :rtype: str + """ + return self._external_link + + @external_link.setter + def external_link(self, external_link): + """Sets the external_link of this ResourcesResourceIdBody. + + + :param external_link: The external_link of this ResourcesResourceIdBody. # noqa: E501 + :type: str + """ + + self._external_link = external_link + + @property + def type(self): + """Gets the type of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The type of this ResourcesResourceIdBody. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ResourcesResourceIdBody. + + + :param type: The type of this ResourcesResourceIdBody. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def size(self): + """Gets the size of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The size of this ResourcesResourceIdBody. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ResourcesResourceIdBody. + + + :param size: The size of this ResourcesResourceIdBody. # noqa: E501 + :type: str + """ + + self._size = size + + @property + def memo_id(self): + """Gets the memo_id of this ResourcesResourceIdBody. # noqa: E501 + + + :return: The memo_id of this ResourcesResourceIdBody. # noqa: E501 + :rtype: int + """ + return self._memo_id + + @memo_id.setter + def memo_id(self, memo_id): + """Sets the memo_id of this ResourcesResourceIdBody. + + + :param memo_id: The memo_id of this ResourcesResourceIdBody. # noqa: E501 + :type: int + """ + + self._memo_id = memo_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResourcesResourceIdBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResourcesResourceIdBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/setting_is_the_setting_to_update_.py b/memos/models/setting_is_the_setting_to_update_.py new file mode 100644 index 0000000..1a1d5ea --- /dev/null +++ b/memos/models/setting_is_the_setting_to_update_.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SettingIsTheSettingToUpdate_(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'general_setting': 'Apiv2WorkspaceGeneralSetting' + } + + attribute_map = { + 'general_setting': 'generalSetting' + } + + def __init__(self, general_setting=None): # noqa: E501 + """SettingIsTheSettingToUpdate_ - a model defined in Swagger""" # noqa: E501 + self._general_setting = None + self.discriminator = None + if general_setting is not None: + self.general_setting = general_setting + + @property + def general_setting(self): + """Gets the general_setting of this SettingIsTheSettingToUpdate_. # noqa: E501 + + + :return: The general_setting of this SettingIsTheSettingToUpdate_. # noqa: E501 + :rtype: Apiv2WorkspaceGeneralSetting + """ + return self._general_setting + + @general_setting.setter + def general_setting(self, general_setting): + """Sets the general_setting of this SettingIsTheSettingToUpdate_. + + + :param general_setting: The general_setting of this SettingIsTheSettingToUpdate_. # noqa: E501 + :type: Apiv2WorkspaceGeneralSetting + """ + + self._general_setting = general_setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SettingIsTheSettingToUpdate_, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SettingIsTheSettingToUpdate_): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/user_role.py b/memos/models/user_role.py new file mode 100644 index 0000000..85b092d --- /dev/null +++ b/memos/models/user_role.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserRole(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ROLE_UNSPECIFIED = "ROLE_UNSPECIFIED" + HOST = "HOST" + ADMIN = "ADMIN" + USER = "USER" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """UserRole - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserRole, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserRole): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/user_service_create_user_access_token_body.py b/memos/models/user_service_create_user_access_token_body.py new file mode 100644 index 0000000..1dffca1 --- /dev/null +++ b/memos/models/user_service_create_user_access_token_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserServiceCreateUserAccessTokenBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'expires_at': 'datetime' + } + + attribute_map = { + 'description': 'description', + 'expires_at': 'expiresAt' + } + + def __init__(self, description=None, expires_at=None): # noqa: E501 + """UserServiceCreateUserAccessTokenBody - a model defined in Swagger""" # noqa: E501 + self._description = None + self._expires_at = None + self.discriminator = None + if description is not None: + self.description = description + if expires_at is not None: + self.expires_at = expires_at + + @property + def description(self): + """Gets the description of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + + + :return: The description of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserServiceCreateUserAccessTokenBody. + + + :param description: The description of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def expires_at(self): + """Gets the expires_at of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + + + :return: The expires_at of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this UserServiceCreateUserAccessTokenBody. + + + :param expires_at: The expires_at of this UserServiceCreateUserAccessTokenBody. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserServiceCreateUserAccessTokenBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserServiceCreateUserAccessTokenBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_activity.py b/memos/models/v2_activity.py new file mode 100644 index 0000000..a63298f --- /dev/null +++ b/memos/models/v2_activity.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Activity(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'creator_id': 'int', + 'type': 'str', + 'level': 'str', + 'create_time': 'datetime', + 'payload': 'Apiv2ActivityPayload' + } + + attribute_map = { + 'id': 'id', + 'creator_id': 'creatorId', + 'type': 'type', + 'level': 'level', + 'create_time': 'createTime', + 'payload': 'payload' + } + + def __init__(self, id=None, creator_id=None, type=None, level=None, create_time=None, payload=None): # noqa: E501 + """V2Activity - a model defined in Swagger""" # noqa: E501 + self._id = None + self._creator_id = None + self._type = None + self._level = None + self._create_time = None + self._payload = None + self.discriminator = None + if id is not None: + self.id = id + if creator_id is not None: + self.creator_id = creator_id + if type is not None: + self.type = type + if level is not None: + self.level = level + if create_time is not None: + self.create_time = create_time + if payload is not None: + self.payload = payload + + @property + def id(self): + """Gets the id of this V2Activity. # noqa: E501 + + + :return: The id of this V2Activity. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V2Activity. + + + :param id: The id of this V2Activity. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def creator_id(self): + """Gets the creator_id of this V2Activity. # noqa: E501 + + + :return: The creator_id of this V2Activity. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this V2Activity. + + + :param creator_id: The creator_id of this V2Activity. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def type(self): + """Gets the type of this V2Activity. # noqa: E501 + + + :return: The type of this V2Activity. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V2Activity. + + + :param type: The type of this V2Activity. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def level(self): + """Gets the level of this V2Activity. # noqa: E501 + + + :return: The level of this V2Activity. # noqa: E501 + :rtype: str + """ + return self._level + + @level.setter + def level(self, level): + """Sets the level of this V2Activity. + + + :param level: The level of this V2Activity. # noqa: E501 + :type: str + """ + + self._level = level + + @property + def create_time(self): + """Gets the create_time of this V2Activity. # noqa: E501 + + + :return: The create_time of this V2Activity. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2Activity. + + + :param create_time: The create_time of this V2Activity. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def payload(self): + """Gets the payload of this V2Activity. # noqa: E501 + + + :return: The payload of this V2Activity. # noqa: E501 + :rtype: Apiv2ActivityPayload + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this V2Activity. + + + :param payload: The payload of this V2Activity. # noqa: E501 + :type: Apiv2ActivityPayload + """ + + self._payload = payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Activity, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Activity): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_batch_upsert_tag_response.py b/memos/models/v2_batch_upsert_tag_response.py new file mode 100644 index 0000000..d89e086 --- /dev/null +++ b/memos/models/v2_batch_upsert_tag_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2BatchUpsertTagResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2BatchUpsertTagResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2BatchUpsertTagResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2BatchUpsertTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_memo_comment_response.py b/memos/models/v2_create_memo_comment_response.py new file mode 100644 index 0000000..2e771a0 --- /dev/null +++ b/memos/models/v2_create_memo_comment_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateMemoCommentResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo': 'V2Memo' + } + + attribute_map = { + 'memo': 'memo' + } + + def __init__(self, memo=None): # noqa: E501 + """V2CreateMemoCommentResponse - a model defined in Swagger""" # noqa: E501 + self._memo = None + self.discriminator = None + if memo is not None: + self.memo = memo + + @property + def memo(self): + """Gets the memo of this V2CreateMemoCommentResponse. # noqa: E501 + + + :return: The memo of this V2CreateMemoCommentResponse. # noqa: E501 + :rtype: V2Memo + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this V2CreateMemoCommentResponse. + + + :param memo: The memo of this V2CreateMemoCommentResponse. # noqa: E501 + :type: V2Memo + """ + + self._memo = memo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateMemoCommentResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateMemoCommentResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_memo_request.py b/memos/models/v2_create_memo_request.py new file mode 100644 index 0000000..85bbdf0 --- /dev/null +++ b/memos/models/v2_create_memo_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateMemoRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'content': 'str', + 'visibility': 'V2Visibility' + } + + attribute_map = { + 'content': 'content', + 'visibility': 'visibility' + } + + def __init__(self, content=None, visibility=None): # noqa: E501 + """V2CreateMemoRequest - a model defined in Swagger""" # noqa: E501 + self._content = None + self._visibility = None + self.discriminator = None + if content is not None: + self.content = content + if visibility is not None: + self.visibility = visibility + + @property + def content(self): + """Gets the content of this V2CreateMemoRequest. # noqa: E501 + + + :return: The content of this V2CreateMemoRequest. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this V2CreateMemoRequest. + + + :param content: The content of this V2CreateMemoRequest. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def visibility(self): + """Gets the visibility of this V2CreateMemoRequest. # noqa: E501 + + + :return: The visibility of this V2CreateMemoRequest. # noqa: E501 + :rtype: V2Visibility + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this V2CreateMemoRequest. + + + :param visibility: The visibility of this V2CreateMemoRequest. # noqa: E501 + :type: V2Visibility + """ + + self._visibility = visibility + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateMemoRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateMemoRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_memo_response.py b/memos/models/v2_create_memo_response.py new file mode 100644 index 0000000..1cf8a58 --- /dev/null +++ b/memos/models/v2_create_memo_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateMemoResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo': 'V2Memo' + } + + attribute_map = { + 'memo': 'memo' + } + + def __init__(self, memo=None): # noqa: E501 + """V2CreateMemoResponse - a model defined in Swagger""" # noqa: E501 + self._memo = None + self.discriminator = None + if memo is not None: + self.memo = memo + + @property + def memo(self): + """Gets the memo of this V2CreateMemoResponse. # noqa: E501 + + + :return: The memo of this V2CreateMemoResponse. # noqa: E501 + :rtype: V2Memo + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this V2CreateMemoResponse. + + + :param memo: The memo of this V2CreateMemoResponse. # noqa: E501 + :type: V2Memo + """ + + self._memo = memo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateMemoResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateMemoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_resource_response.py b/memos/models/v2_create_resource_response.py new file mode 100644 index 0000000..cd8de76 --- /dev/null +++ b/memos/models/v2_create_resource_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateResourceResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource': 'V2Resource' + } + + attribute_map = { + 'resource': 'resource' + } + + def __init__(self, resource=None): # noqa: E501 + """V2CreateResourceResponse - a model defined in Swagger""" # noqa: E501 + self._resource = None + self.discriminator = None + if resource is not None: + self.resource = resource + + @property + def resource(self): + """Gets the resource of this V2CreateResourceResponse. # noqa: E501 + + + :return: The resource of this V2CreateResourceResponse. # noqa: E501 + :rtype: V2Resource + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V2CreateResourceResponse. + + + :param resource: The resource of this V2CreateResourceResponse. # noqa: E501 + :type: V2Resource + """ + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateResourceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateResourceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_user_access_token_response.py b/memos/models/v2_create_user_access_token_response.py new file mode 100644 index 0000000..2417b81 --- /dev/null +++ b/memos/models/v2_create_user_access_token_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateUserAccessTokenResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_token': 'V2UserAccessToken' + } + + attribute_map = { + 'access_token': 'accessToken' + } + + def __init__(self, access_token=None): # noqa: E501 + """V2CreateUserAccessTokenResponse - a model defined in Swagger""" # noqa: E501 + self._access_token = None + self.discriminator = None + if access_token is not None: + self.access_token = access_token + + @property + def access_token(self): + """Gets the access_token of this V2CreateUserAccessTokenResponse. # noqa: E501 + + + :return: The access_token of this V2CreateUserAccessTokenResponse. # noqa: E501 + :rtype: V2UserAccessToken + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this V2CreateUserAccessTokenResponse. + + + :param access_token: The access_token of this V2CreateUserAccessTokenResponse. # noqa: E501 + :type: V2UserAccessToken + """ + + self._access_token = access_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateUserAccessTokenResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateUserAccessTokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_user_response.py b/memos/models/v2_create_user_response.py new file mode 100644 index 0000000..e421226 --- /dev/null +++ b/memos/models/v2_create_user_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateUserResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2CreateUserResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2CreateUserResponse. # noqa: E501 + + + :return: The user of this V2CreateUserResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2CreateUserResponse. + + + :param user: The user of this V2CreateUserResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateUserResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateUserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_webhook_request.py b/memos/models/v2_create_webhook_request.py new file mode 100644 index 0000000..ae09e77 --- /dev/null +++ b/memos/models/v2_create_webhook_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateWebhookRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'name': 'name', + 'url': 'url' + } + + def __init__(self, name=None, url=None): # noqa: E501 + """V2CreateWebhookRequest - a model defined in Swagger""" # noqa: E501 + self._name = None + self._url = None + self.discriminator = None + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def name(self): + """Gets the name of this V2CreateWebhookRequest. # noqa: E501 + + + :return: The name of this V2CreateWebhookRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2CreateWebhookRequest. + + + :param name: The name of this V2CreateWebhookRequest. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this V2CreateWebhookRequest. # noqa: E501 + + + :return: The url of this V2CreateWebhookRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this V2CreateWebhookRequest. + + + :param url: The url of this V2CreateWebhookRequest. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateWebhookRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateWebhookRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_create_webhook_response.py b/memos/models/v2_create_webhook_response.py new file mode 100644 index 0000000..1d0719b --- /dev/null +++ b/memos/models/v2_create_webhook_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2CreateWebhookResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'webhook': 'Apiv2Webhook' + } + + attribute_map = { + 'webhook': 'webhook' + } + + def __init__(self, webhook=None): # noqa: E501 + """V2CreateWebhookResponse - a model defined in Swagger""" # noqa: E501 + self._webhook = None + self.discriminator = None + if webhook is not None: + self.webhook = webhook + + @property + def webhook(self): + """Gets the webhook of this V2CreateWebhookResponse. # noqa: E501 + + + :return: The webhook of this V2CreateWebhookResponse. # noqa: E501 + :rtype: Apiv2Webhook + """ + return self._webhook + + @webhook.setter + def webhook(self, webhook): + """Sets the webhook of this V2CreateWebhookResponse. + + + :param webhook: The webhook of this V2CreateWebhookResponse. # noqa: E501 + :type: Apiv2Webhook + """ + + self._webhook = webhook + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2CreateWebhookResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2CreateWebhookResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_inbox_response.py b/memos/models/v2_delete_inbox_response.py new file mode 100644 index 0000000..a96ab00 --- /dev/null +++ b/memos/models/v2_delete_inbox_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteInboxResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteInboxResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteInboxResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteInboxResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_memo_reaction_response.py b/memos/models/v2_delete_memo_reaction_response.py new file mode 100644 index 0000000..6a8abb2 --- /dev/null +++ b/memos/models/v2_delete_memo_reaction_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteMemoReactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteMemoReactionResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteMemoReactionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteMemoReactionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_memo_response.py b/memos/models/v2_delete_memo_response.py new file mode 100644 index 0000000..f62b24a --- /dev/null +++ b/memos/models/v2_delete_memo_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteMemoResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteMemoResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteMemoResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteMemoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_resource_response.py b/memos/models/v2_delete_resource_response.py new file mode 100644 index 0000000..c0ec95a --- /dev/null +++ b/memos/models/v2_delete_resource_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteResourceResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteResourceResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteResourceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteResourceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_tag_response.py b/memos/models/v2_delete_tag_response.py new file mode 100644 index 0000000..68a088f --- /dev/null +++ b/memos/models/v2_delete_tag_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteTagResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteTagResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteTagResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_user_access_token_response.py b/memos/models/v2_delete_user_access_token_response.py new file mode 100644 index 0000000..0b7164e --- /dev/null +++ b/memos/models/v2_delete_user_access_token_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteUserAccessTokenResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteUserAccessTokenResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteUserAccessTokenResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteUserAccessTokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_user_response.py b/memos/models/v2_delete_user_response.py new file mode 100644 index 0000000..63a51ae --- /dev/null +++ b/memos/models/v2_delete_user_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteUserResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteUserResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteUserResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteUserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_delete_webhook_response.py b/memos/models/v2_delete_webhook_response.py new file mode 100644 index 0000000..1264a47 --- /dev/null +++ b/memos/models/v2_delete_webhook_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2DeleteWebhookResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2DeleteWebhookResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2DeleteWebhookResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2DeleteWebhookResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_export_memos_response.py b/memos/models/v2_export_memos_response.py new file mode 100644 index 0000000..3741007 --- /dev/null +++ b/memos/models/v2_export_memos_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ExportMemosResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'content': 'str' + } + + attribute_map = { + 'content': 'content' + } + + def __init__(self, content=None): # noqa: E501 + """V2ExportMemosResponse - a model defined in Swagger""" # noqa: E501 + self._content = None + self.discriminator = None + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this V2ExportMemosResponse. # noqa: E501 + + + :return: The content of this V2ExportMemosResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this V2ExportMemosResponse. + + + :param content: The content of this V2ExportMemosResponse. # noqa: E501 + :type: str + """ + + self._content = content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ExportMemosResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ExportMemosResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_activity_response.py b/memos/models/v2_get_activity_response.py new file mode 100644 index 0000000..c806cec --- /dev/null +++ b/memos/models/v2_get_activity_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetActivityResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'activity': 'V2Activity' + } + + attribute_map = { + 'activity': 'activity' + } + + def __init__(self, activity=None): # noqa: E501 + """V2GetActivityResponse - a model defined in Swagger""" # noqa: E501 + self._activity = None + self.discriminator = None + if activity is not None: + self.activity = activity + + @property + def activity(self): + """Gets the activity of this V2GetActivityResponse. # noqa: E501 + + + :return: The activity of this V2GetActivityResponse. # noqa: E501 + :rtype: V2Activity + """ + return self._activity + + @activity.setter + def activity(self, activity): + """Sets the activity of this V2GetActivityResponse. + + + :param activity: The activity of this V2GetActivityResponse. # noqa: E501 + :type: V2Activity + """ + + self._activity = activity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetActivityResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetActivityResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_auth_status_response.py b/memos/models/v2_get_auth_status_response.py new file mode 100644 index 0000000..0090922 --- /dev/null +++ b/memos/models/v2_get_auth_status_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetAuthStatusResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2GetAuthStatusResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2GetAuthStatusResponse. # noqa: E501 + + + :return: The user of this V2GetAuthStatusResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2GetAuthStatusResponse. + + + :param user: The user of this V2GetAuthStatusResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetAuthStatusResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetAuthStatusResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_memo_by_name_response.py b/memos/models/v2_get_memo_by_name_response.py new file mode 100644 index 0000000..b1a4bbd --- /dev/null +++ b/memos/models/v2_get_memo_by_name_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetMemoByNameResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo': 'V2Memo' + } + + attribute_map = { + 'memo': 'memo' + } + + def __init__(self, memo=None): # noqa: E501 + """V2GetMemoByNameResponse - a model defined in Swagger""" # noqa: E501 + self._memo = None + self.discriminator = None + if memo is not None: + self.memo = memo + + @property + def memo(self): + """Gets the memo of this V2GetMemoByNameResponse. # noqa: E501 + + + :return: The memo of this V2GetMemoByNameResponse. # noqa: E501 + :rtype: V2Memo + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this V2GetMemoByNameResponse. + + + :param memo: The memo of this V2GetMemoByNameResponse. # noqa: E501 + :type: V2Memo + """ + + self._memo = memo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetMemoByNameResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetMemoByNameResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_memo_response.py b/memos/models/v2_get_memo_response.py new file mode 100644 index 0000000..54c4f39 --- /dev/null +++ b/memos/models/v2_get_memo_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetMemoResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo': 'V2Memo' + } + + attribute_map = { + 'memo': 'memo' + } + + def __init__(self, memo=None): # noqa: E501 + """V2GetMemoResponse - a model defined in Swagger""" # noqa: E501 + self._memo = None + self.discriminator = None + if memo is not None: + self.memo = memo + + @property + def memo(self): + """Gets the memo of this V2GetMemoResponse. # noqa: E501 + + + :return: The memo of this V2GetMemoResponse. # noqa: E501 + :rtype: V2Memo + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this V2GetMemoResponse. + + + :param memo: The memo of this V2GetMemoResponse. # noqa: E501 + :type: V2Memo + """ + + self._memo = memo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetMemoResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetMemoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_resource_by_name_response.py b/memos/models/v2_get_resource_by_name_response.py new file mode 100644 index 0000000..b3a2b69 --- /dev/null +++ b/memos/models/v2_get_resource_by_name_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetResourceByNameResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource': 'V2Resource' + } + + attribute_map = { + 'resource': 'resource' + } + + def __init__(self, resource=None): # noqa: E501 + """V2GetResourceByNameResponse - a model defined in Swagger""" # noqa: E501 + self._resource = None + self.discriminator = None + if resource is not None: + self.resource = resource + + @property + def resource(self): + """Gets the resource of this V2GetResourceByNameResponse. # noqa: E501 + + + :return: The resource of this V2GetResourceByNameResponse. # noqa: E501 + :rtype: V2Resource + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V2GetResourceByNameResponse. + + + :param resource: The resource of this V2GetResourceByNameResponse. # noqa: E501 + :type: V2Resource + """ + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetResourceByNameResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetResourceByNameResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_resource_response.py b/memos/models/v2_get_resource_response.py new file mode 100644 index 0000000..35e715b --- /dev/null +++ b/memos/models/v2_get_resource_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetResourceResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource': 'V2Resource' + } + + attribute_map = { + 'resource': 'resource' + } + + def __init__(self, resource=None): # noqa: E501 + """V2GetResourceResponse - a model defined in Swagger""" # noqa: E501 + self._resource = None + self.discriminator = None + if resource is not None: + self.resource = resource + + @property + def resource(self): + """Gets the resource of this V2GetResourceResponse. # noqa: E501 + + + :return: The resource of this V2GetResourceResponse. # noqa: E501 + :rtype: V2Resource + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V2GetResourceResponse. + + + :param resource: The resource of this V2GetResourceResponse. # noqa: E501 + :type: V2Resource + """ + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetResourceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetResourceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_tag_suggestions_response.py b/memos/models/v2_get_tag_suggestions_response.py new file mode 100644 index 0000000..dfabf66 --- /dev/null +++ b/memos/models/v2_get_tag_suggestions_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetTagSuggestionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tags': 'list[str]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): # noqa: E501 + """V2GetTagSuggestionsResponse - a model defined in Swagger""" # noqa: E501 + self._tags = None + self.discriminator = None + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this V2GetTagSuggestionsResponse. # noqa: E501 + + + :return: The tags of this V2GetTagSuggestionsResponse. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this V2GetTagSuggestionsResponse. + + + :param tags: The tags of this V2GetTagSuggestionsResponse. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetTagSuggestionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetTagSuggestionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_user_memos_stats_response.py b/memos/models/v2_get_user_memos_stats_response.py new file mode 100644 index 0000000..84ffb97 --- /dev/null +++ b/memos/models/v2_get_user_memos_stats_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetUserMemosStatsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'stats': 'dict(str, int)' + } + + attribute_map = { + 'stats': 'stats' + } + + def __init__(self, stats=None): # noqa: E501 + """V2GetUserMemosStatsResponse - a model defined in Swagger""" # noqa: E501 + self._stats = None + self.discriminator = None + if stats is not None: + self.stats = stats + + @property + def stats(self): + """Gets the stats of this V2GetUserMemosStatsResponse. # noqa: E501 + + stats is the stats of memo creating/updating activities. key is the year-month-day string. e.g. \"2020-01-01\". # noqa: E501 + + :return: The stats of this V2GetUserMemosStatsResponse. # noqa: E501 + :rtype: dict(str, int) + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this V2GetUserMemosStatsResponse. + + stats is the stats of memo creating/updating activities. key is the year-month-day string. e.g. \"2020-01-01\". # noqa: E501 + + :param stats: The stats of this V2GetUserMemosStatsResponse. # noqa: E501 + :type: dict(str, int) + """ + + self._stats = stats + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetUserMemosStatsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetUserMemosStatsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_user_response.py b/memos/models/v2_get_user_response.py new file mode 100644 index 0000000..0266231 --- /dev/null +++ b/memos/models/v2_get_user_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetUserResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2GetUserResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2GetUserResponse. # noqa: E501 + + + :return: The user of this V2GetUserResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2GetUserResponse. + + + :param user: The user of this V2GetUserResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetUserResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetUserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_user_setting_response.py b/memos/models/v2_get_user_setting_response.py new file mode 100644 index 0000000..00587ab --- /dev/null +++ b/memos/models/v2_get_user_setting_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetUserSettingResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'setting': 'Apiv2UserSetting' + } + + attribute_map = { + 'setting': 'setting' + } + + def __init__(self, setting=None): # noqa: E501 + """V2GetUserSettingResponse - a model defined in Swagger""" # noqa: E501 + self._setting = None + self.discriminator = None + if setting is not None: + self.setting = setting + + @property + def setting(self): + """Gets the setting of this V2GetUserSettingResponse. # noqa: E501 + + + :return: The setting of this V2GetUserSettingResponse. # noqa: E501 + :rtype: Apiv2UserSetting + """ + return self._setting + + @setting.setter + def setting(self, setting): + """Sets the setting of this V2GetUserSettingResponse. + + + :param setting: The setting of this V2GetUserSettingResponse. # noqa: E501 + :type: Apiv2UserSetting + """ + + self._setting = setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetUserSettingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetUserSettingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_webhook_response.py b/memos/models/v2_get_webhook_response.py new file mode 100644 index 0000000..80f7088 --- /dev/null +++ b/memos/models/v2_get_webhook_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetWebhookResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'webhook': 'Apiv2Webhook' + } + + attribute_map = { + 'webhook': 'webhook' + } + + def __init__(self, webhook=None): # noqa: E501 + """V2GetWebhookResponse - a model defined in Swagger""" # noqa: E501 + self._webhook = None + self.discriminator = None + if webhook is not None: + self.webhook = webhook + + @property + def webhook(self): + """Gets the webhook of this V2GetWebhookResponse. # noqa: E501 + + + :return: The webhook of this V2GetWebhookResponse. # noqa: E501 + :rtype: Apiv2Webhook + """ + return self._webhook + + @webhook.setter + def webhook(self, webhook): + """Sets the webhook of this V2GetWebhookResponse. + + + :param webhook: The webhook of this V2GetWebhookResponse. # noqa: E501 + :type: Apiv2Webhook + """ + + self._webhook = webhook + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetWebhookResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetWebhookResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_workspace_profile_response.py b/memos/models/v2_get_workspace_profile_response.py new file mode 100644 index 0000000..296e841 --- /dev/null +++ b/memos/models/v2_get_workspace_profile_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetWorkspaceProfileResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'workspace_profile': 'V2WorkspaceProfile' + } + + attribute_map = { + 'workspace_profile': 'workspaceProfile' + } + + def __init__(self, workspace_profile=None): # noqa: E501 + """V2GetWorkspaceProfileResponse - a model defined in Swagger""" # noqa: E501 + self._workspace_profile = None + self.discriminator = None + if workspace_profile is not None: + self.workspace_profile = workspace_profile + + @property + def workspace_profile(self): + """Gets the workspace_profile of this V2GetWorkspaceProfileResponse. # noqa: E501 + + + :return: The workspace_profile of this V2GetWorkspaceProfileResponse. # noqa: E501 + :rtype: V2WorkspaceProfile + """ + return self._workspace_profile + + @workspace_profile.setter + def workspace_profile(self, workspace_profile): + """Sets the workspace_profile of this V2GetWorkspaceProfileResponse. + + + :param workspace_profile: The workspace_profile of this V2GetWorkspaceProfileResponse. # noqa: E501 + :type: V2WorkspaceProfile + """ + + self._workspace_profile = workspace_profile + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetWorkspaceProfileResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetWorkspaceProfileResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_get_workspace_setting_response.py b/memos/models/v2_get_workspace_setting_response.py new file mode 100644 index 0000000..363b00e --- /dev/null +++ b/memos/models/v2_get_workspace_setting_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2GetWorkspaceSettingResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'setting': 'Apiv2WorkspaceSetting' + } + + attribute_map = { + 'setting': 'setting' + } + + def __init__(self, setting=None): # noqa: E501 + """V2GetWorkspaceSettingResponse - a model defined in Swagger""" # noqa: E501 + self._setting = None + self.discriminator = None + if setting is not None: + self.setting = setting + + @property + def setting(self): + """Gets the setting of this V2GetWorkspaceSettingResponse. # noqa: E501 + + + :return: The setting of this V2GetWorkspaceSettingResponse. # noqa: E501 + :rtype: Apiv2WorkspaceSetting + """ + return self._setting + + @setting.setter + def setting(self, setting): + """Sets the setting of this V2GetWorkspaceSettingResponse. + + + :param setting: The setting of this V2GetWorkspaceSettingResponse. # noqa: E501 + :type: Apiv2WorkspaceSetting + """ + + self._setting = setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2GetWorkspaceSettingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2GetWorkspaceSettingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_inbox.py b/memos/models/v2_inbox.py new file mode 100644 index 0000000..3c52281 --- /dev/null +++ b/memos/models/v2_inbox.py @@ -0,0 +1,266 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Inbox(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'sender': 'str', + 'receiver': 'str', + 'status': 'V2InboxStatus', + 'create_time': 'datetime', + 'type': 'V2InboxType', + 'activity_id': 'int' + } + + attribute_map = { + 'name': 'name', + 'sender': 'sender', + 'receiver': 'receiver', + 'status': 'status', + 'create_time': 'createTime', + 'type': 'type', + 'activity_id': 'activityId' + } + + def __init__(self, name=None, sender=None, receiver=None, status=None, create_time=None, type=None, activity_id=None): # noqa: E501 + """V2Inbox - a model defined in Swagger""" # noqa: E501 + self._name = None + self._sender = None + self._receiver = None + self._status = None + self._create_time = None + self._type = None + self._activity_id = None + self.discriminator = None + if name is not None: + self.name = name + if sender is not None: + self.sender = sender + if receiver is not None: + self.receiver = receiver + if status is not None: + self.status = status + if create_time is not None: + self.create_time = create_time + if type is not None: + self.type = type + if activity_id is not None: + self.activity_id = activity_id + + @property + def name(self): + """Gets the name of this V2Inbox. # noqa: E501 + + + :return: The name of this V2Inbox. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2Inbox. + + + :param name: The name of this V2Inbox. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def sender(self): + """Gets the sender of this V2Inbox. # noqa: E501 + + + :return: The sender of this V2Inbox. # noqa: E501 + :rtype: str + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this V2Inbox. + + + :param sender: The sender of this V2Inbox. # noqa: E501 + :type: str + """ + + self._sender = sender + + @property + def receiver(self): + """Gets the receiver of this V2Inbox. # noqa: E501 + + + :return: The receiver of this V2Inbox. # noqa: E501 + :rtype: str + """ + return self._receiver + + @receiver.setter + def receiver(self, receiver): + """Sets the receiver of this V2Inbox. + + + :param receiver: The receiver of this V2Inbox. # noqa: E501 + :type: str + """ + + self._receiver = receiver + + @property + def status(self): + """Gets the status of this V2Inbox. # noqa: E501 + + + :return: The status of this V2Inbox. # noqa: E501 + :rtype: V2InboxStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V2Inbox. + + + :param status: The status of this V2Inbox. # noqa: E501 + :type: V2InboxStatus + """ + + self._status = status + + @property + def create_time(self): + """Gets the create_time of this V2Inbox. # noqa: E501 + + + :return: The create_time of this V2Inbox. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2Inbox. + + + :param create_time: The create_time of this V2Inbox. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def type(self): + """Gets the type of this V2Inbox. # noqa: E501 + + + :return: The type of this V2Inbox. # noqa: E501 + :rtype: V2InboxType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V2Inbox. + + + :param type: The type of this V2Inbox. # noqa: E501 + :type: V2InboxType + """ + + self._type = type + + @property + def activity_id(self): + """Gets the activity_id of this V2Inbox. # noqa: E501 + + + :return: The activity_id of this V2Inbox. # noqa: E501 + :rtype: int + """ + return self._activity_id + + @activity_id.setter + def activity_id(self, activity_id): + """Sets the activity_id of this V2Inbox. + + + :param activity_id: The activity_id of this V2Inbox. # noqa: E501 + :type: int + """ + + self._activity_id = activity_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Inbox, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Inbox): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_inbox_name_body.py b/memos/models/v2_inbox_name_body.py new file mode 100644 index 0000000..4637322 --- /dev/null +++ b/memos/models/v2_inbox_name_body.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2InboxNameBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sender': 'str', + 'receiver': 'str', + 'status': 'V2InboxStatus', + 'create_time': 'datetime', + 'type': 'V2InboxType', + 'activity_id': 'int' + } + + attribute_map = { + 'sender': 'sender', + 'receiver': 'receiver', + 'status': 'status', + 'create_time': 'createTime', + 'type': 'type', + 'activity_id': 'activityId' + } + + def __init__(self, sender=None, receiver=None, status=None, create_time=None, type=None, activity_id=None): # noqa: E501 + """V2InboxNameBody - a model defined in Swagger""" # noqa: E501 + self._sender = None + self._receiver = None + self._status = None + self._create_time = None + self._type = None + self._activity_id = None + self.discriminator = None + if sender is not None: + self.sender = sender + if receiver is not None: + self.receiver = receiver + if status is not None: + self.status = status + if create_time is not None: + self.create_time = create_time + if type is not None: + self.type = type + if activity_id is not None: + self.activity_id = activity_id + + @property + def sender(self): + """Gets the sender of this V2InboxNameBody. # noqa: E501 + + + :return: The sender of this V2InboxNameBody. # noqa: E501 + :rtype: str + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this V2InboxNameBody. + + + :param sender: The sender of this V2InboxNameBody. # noqa: E501 + :type: str + """ + + self._sender = sender + + @property + def receiver(self): + """Gets the receiver of this V2InboxNameBody. # noqa: E501 + + + :return: The receiver of this V2InboxNameBody. # noqa: E501 + :rtype: str + """ + return self._receiver + + @receiver.setter + def receiver(self, receiver): + """Sets the receiver of this V2InboxNameBody. + + + :param receiver: The receiver of this V2InboxNameBody. # noqa: E501 + :type: str + """ + + self._receiver = receiver + + @property + def status(self): + """Gets the status of this V2InboxNameBody. # noqa: E501 + + + :return: The status of this V2InboxNameBody. # noqa: E501 + :rtype: V2InboxStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V2InboxNameBody. + + + :param status: The status of this V2InboxNameBody. # noqa: E501 + :type: V2InboxStatus + """ + + self._status = status + + @property + def create_time(self): + """Gets the create_time of this V2InboxNameBody. # noqa: E501 + + + :return: The create_time of this V2InboxNameBody. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2InboxNameBody. + + + :param create_time: The create_time of this V2InboxNameBody. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def type(self): + """Gets the type of this V2InboxNameBody. # noqa: E501 + + + :return: The type of this V2InboxNameBody. # noqa: E501 + :rtype: V2InboxType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V2InboxNameBody. + + + :param type: The type of this V2InboxNameBody. # noqa: E501 + :type: V2InboxType + """ + + self._type = type + + @property + def activity_id(self): + """Gets the activity_id of this V2InboxNameBody. # noqa: E501 + + + :return: The activity_id of this V2InboxNameBody. # noqa: E501 + :rtype: int + """ + return self._activity_id + + @activity_id.setter + def activity_id(self, activity_id): + """Sets the activity_id of this V2InboxNameBody. + + + :param activity_id: The activity_id of this V2InboxNameBody. # noqa: E501 + :type: int + """ + + self._activity_id = activity_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2InboxNameBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2InboxNameBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_inbox_status.py b/memos/models/v2_inbox_status.py new file mode 100644 index 0000000..33344d3 --- /dev/null +++ b/memos/models/v2_inbox_status.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2InboxStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED" + UNREAD = "UNREAD" + ARCHIVED = "ARCHIVED" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2InboxStatus - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2InboxStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2InboxStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_inbox_type.py b/memos/models/v2_inbox_type.py new file mode 100644 index 0000000..b201939 --- /dev/null +++ b/memos/models/v2_inbox_type.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2InboxType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "TYPE_UNSPECIFIED" + MEMO_COMMENT = "TYPE_MEMO_COMMENT" + VERSION_UPDATE = "TYPE_VERSION_UPDATE" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2InboxType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2InboxType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2InboxType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_inboxes_response.py b/memos/models/v2_list_inboxes_response.py new file mode 100644 index 0000000..1e16738 --- /dev/null +++ b/memos/models/v2_list_inboxes_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListInboxesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'inboxes': 'list[V2Inbox]' + } + + attribute_map = { + 'inboxes': 'inboxes' + } + + def __init__(self, inboxes=None): # noqa: E501 + """V2ListInboxesResponse - a model defined in Swagger""" # noqa: E501 + self._inboxes = None + self.discriminator = None + if inboxes is not None: + self.inboxes = inboxes + + @property + def inboxes(self): + """Gets the inboxes of this V2ListInboxesResponse. # noqa: E501 + + + :return: The inboxes of this V2ListInboxesResponse. # noqa: E501 + :rtype: list[V2Inbox] + """ + return self._inboxes + + @inboxes.setter + def inboxes(self, inboxes): + """Sets the inboxes of this V2ListInboxesResponse. + + + :param inboxes: The inboxes of this V2ListInboxesResponse. # noqa: E501 + :type: list[V2Inbox] + """ + + self._inboxes = inboxes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListInboxesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListInboxesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_memo_comments_response.py b/memos/models/v2_list_memo_comments_response.py new file mode 100644 index 0000000..c720929 --- /dev/null +++ b/memos/models/v2_list_memo_comments_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListMemoCommentsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memos': 'list[V2Memo]' + } + + attribute_map = { + 'memos': 'memos' + } + + def __init__(self, memos=None): # noqa: E501 + """V2ListMemoCommentsResponse - a model defined in Swagger""" # noqa: E501 + self._memos = None + self.discriminator = None + if memos is not None: + self.memos = memos + + @property + def memos(self): + """Gets the memos of this V2ListMemoCommentsResponse. # noqa: E501 + + + :return: The memos of this V2ListMemoCommentsResponse. # noqa: E501 + :rtype: list[V2Memo] + """ + return self._memos + + @memos.setter + def memos(self, memos): + """Sets the memos of this V2ListMemoCommentsResponse. + + + :param memos: The memos of this V2ListMemoCommentsResponse. # noqa: E501 + :type: list[V2Memo] + """ + + self._memos = memos + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListMemoCommentsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListMemoCommentsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_memo_reactions_response.py b/memos/models/v2_list_memo_reactions_response.py new file mode 100644 index 0000000..a2bd567 --- /dev/null +++ b/memos/models/v2_list_memo_reactions_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListMemoReactionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'reactions': 'list[Apiv2Reaction]' + } + + attribute_map = { + 'reactions': 'reactions' + } + + def __init__(self, reactions=None): # noqa: E501 + """V2ListMemoReactionsResponse - a model defined in Swagger""" # noqa: E501 + self._reactions = None + self.discriminator = None + if reactions is not None: + self.reactions = reactions + + @property + def reactions(self): + """Gets the reactions of this V2ListMemoReactionsResponse. # noqa: E501 + + + :return: The reactions of this V2ListMemoReactionsResponse. # noqa: E501 + :rtype: list[Apiv2Reaction] + """ + return self._reactions + + @reactions.setter + def reactions(self, reactions): + """Sets the reactions of this V2ListMemoReactionsResponse. + + + :param reactions: The reactions of this V2ListMemoReactionsResponse. # noqa: E501 + :type: list[Apiv2Reaction] + """ + + self._reactions = reactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListMemoReactionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListMemoReactionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_memo_relations_response.py b/memos/models/v2_list_memo_relations_response.py new file mode 100644 index 0000000..2fa52fc --- /dev/null +++ b/memos/models/v2_list_memo_relations_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListMemoRelationsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'relations': 'list[V2MemoRelation]' + } + + attribute_map = { + 'relations': 'relations' + } + + def __init__(self, relations=None): # noqa: E501 + """V2ListMemoRelationsResponse - a model defined in Swagger""" # noqa: E501 + self._relations = None + self.discriminator = None + if relations is not None: + self.relations = relations + + @property + def relations(self): + """Gets the relations of this V2ListMemoRelationsResponse. # noqa: E501 + + + :return: The relations of this V2ListMemoRelationsResponse. # noqa: E501 + :rtype: list[V2MemoRelation] + """ + return self._relations + + @relations.setter + def relations(self, relations): + """Sets the relations of this V2ListMemoRelationsResponse. + + + :param relations: The relations of this V2ListMemoRelationsResponse. # noqa: E501 + :type: list[V2MemoRelation] + """ + + self._relations = relations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListMemoRelationsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListMemoRelationsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_memo_resources_response.py b/memos/models/v2_list_memo_resources_response.py new file mode 100644 index 0000000..8edc2c1 --- /dev/null +++ b/memos/models/v2_list_memo_resources_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListMemoResourcesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resources': 'list[V2Resource]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None): # noqa: E501 + """V2ListMemoResourcesResponse - a model defined in Swagger""" # noqa: E501 + self._resources = None + self.discriminator = None + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this V2ListMemoResourcesResponse. # noqa: E501 + + + :return: The resources of this V2ListMemoResourcesResponse. # noqa: E501 + :rtype: list[V2Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V2ListMemoResourcesResponse. + + + :param resources: The resources of this V2ListMemoResourcesResponse. # noqa: E501 + :type: list[V2Resource] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListMemoResourcesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListMemoResourcesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_memos_response.py b/memos/models/v2_list_memos_response.py new file mode 100644 index 0000000..5861f1e --- /dev/null +++ b/memos/models/v2_list_memos_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListMemosResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memos': 'list[V2Memo]', + 'next_page_token': 'str' + } + + attribute_map = { + 'memos': 'memos', + 'next_page_token': 'nextPageToken' + } + + def __init__(self, memos=None, next_page_token=None): # noqa: E501 + """V2ListMemosResponse - a model defined in Swagger""" # noqa: E501 + self._memos = None + self._next_page_token = None + self.discriminator = None + if memos is not None: + self.memos = memos + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def memos(self): + """Gets the memos of this V2ListMemosResponse. # noqa: E501 + + + :return: The memos of this V2ListMemosResponse. # noqa: E501 + :rtype: list[V2Memo] + """ + return self._memos + + @memos.setter + def memos(self, memos): + """Sets the memos of this V2ListMemosResponse. + + + :param memos: The memos of this V2ListMemosResponse. # noqa: E501 + :type: list[V2Memo] + """ + + self._memos = memos + + @property + def next_page_token(self): + """Gets the next_page_token of this V2ListMemosResponse. # noqa: E501 + + A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. # noqa: E501 + + :return: The next_page_token of this V2ListMemosResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this V2ListMemosResponse. + + A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. # noqa: E501 + + :param next_page_token: The next_page_token of this V2ListMemosResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListMemosResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListMemosResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_resources_response.py b/memos/models/v2_list_resources_response.py new file mode 100644 index 0000000..dad24b5 --- /dev/null +++ b/memos/models/v2_list_resources_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListResourcesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resources': 'list[V2Resource]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None): # noqa: E501 + """V2ListResourcesResponse - a model defined in Swagger""" # noqa: E501 + self._resources = None + self.discriminator = None + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this V2ListResourcesResponse. # noqa: E501 + + + :return: The resources of this V2ListResourcesResponse. # noqa: E501 + :rtype: list[V2Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V2ListResourcesResponse. + + + :param resources: The resources of this V2ListResourcesResponse. # noqa: E501 + :type: list[V2Resource] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListResourcesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListResourcesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_tags_response.py b/memos/models/v2_list_tags_response.py new file mode 100644 index 0000000..33eb59b --- /dev/null +++ b/memos/models/v2_list_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListTagsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tags': 'list[V2Tag]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): # noqa: E501 + """V2ListTagsResponse - a model defined in Swagger""" # noqa: E501 + self._tags = None + self.discriminator = None + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this V2ListTagsResponse. # noqa: E501 + + + :return: The tags of this V2ListTagsResponse. # noqa: E501 + :rtype: list[V2Tag] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this V2ListTagsResponse. + + + :param tags: The tags of this V2ListTagsResponse. # noqa: E501 + :type: list[V2Tag] + """ + + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListTagsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_user_access_tokens_response.py b/memos/models/v2_list_user_access_tokens_response.py new file mode 100644 index 0000000..6c14839 --- /dev/null +++ b/memos/models/v2_list_user_access_tokens_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListUserAccessTokensResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_tokens': 'list[V2UserAccessToken]' + } + + attribute_map = { + 'access_tokens': 'accessTokens' + } + + def __init__(self, access_tokens=None): # noqa: E501 + """V2ListUserAccessTokensResponse - a model defined in Swagger""" # noqa: E501 + self._access_tokens = None + self.discriminator = None + if access_tokens is not None: + self.access_tokens = access_tokens + + @property + def access_tokens(self): + """Gets the access_tokens of this V2ListUserAccessTokensResponse. # noqa: E501 + + + :return: The access_tokens of this V2ListUserAccessTokensResponse. # noqa: E501 + :rtype: list[V2UserAccessToken] + """ + return self._access_tokens + + @access_tokens.setter + def access_tokens(self, access_tokens): + """Sets the access_tokens of this V2ListUserAccessTokensResponse. + + + :param access_tokens: The access_tokens of this V2ListUserAccessTokensResponse. # noqa: E501 + :type: list[V2UserAccessToken] + """ + + self._access_tokens = access_tokens + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListUserAccessTokensResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListUserAccessTokensResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_users_response.py b/memos/models/v2_list_users_response.py new file mode 100644 index 0000000..dfe49cf --- /dev/null +++ b/memos/models/v2_list_users_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListUsersResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'users': 'list[V2User]' + } + + attribute_map = { + 'users': 'users' + } + + def __init__(self, users=None): # noqa: E501 + """V2ListUsersResponse - a model defined in Swagger""" # noqa: E501 + self._users = None + self.discriminator = None + if users is not None: + self.users = users + + @property + def users(self): + """Gets the users of this V2ListUsersResponse. # noqa: E501 + + + :return: The users of this V2ListUsersResponse. # noqa: E501 + :rtype: list[V2User] + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this V2ListUsersResponse. + + + :param users: The users of this V2ListUsersResponse. # noqa: E501 + :type: list[V2User] + """ + + self._users = users + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListUsersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListUsersResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_list_webhooks_response.py b/memos/models/v2_list_webhooks_response.py new file mode 100644 index 0000000..7c2235e --- /dev/null +++ b/memos/models/v2_list_webhooks_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2ListWebhooksResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'webhooks': 'list[Apiv2Webhook]' + } + + attribute_map = { + 'webhooks': 'webhooks' + } + + def __init__(self, webhooks=None): # noqa: E501 + """V2ListWebhooksResponse - a model defined in Swagger""" # noqa: E501 + self._webhooks = None + self.discriminator = None + if webhooks is not None: + self.webhooks = webhooks + + @property + def webhooks(self): + """Gets the webhooks of this V2ListWebhooksResponse. # noqa: E501 + + + :return: The webhooks of this V2ListWebhooksResponse. # noqa: E501 + :rtype: list[Apiv2Webhook] + """ + return self._webhooks + + @webhooks.setter + def webhooks(self, webhooks): + """Sets the webhooks of this V2ListWebhooksResponse. + + + :param webhooks: The webhooks of this V2ListWebhooksResponse. # noqa: E501 + :type: list[Apiv2Webhook] + """ + + self._webhooks = webhooks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2ListWebhooksResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2ListWebhooksResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_memo.py b/memos/models/v2_memo.py new file mode 100644 index 0000000..9a1254f --- /dev/null +++ b/memos/models/v2_memo.py @@ -0,0 +1,478 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Memo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'name': 'str', + 'row_status': 'Apiv2RowStatus', + 'creator': 'str', + 'creator_id': 'int', + 'create_time': 'datetime', + 'update_time': 'datetime', + 'display_time': 'datetime', + 'content': 'str', + 'visibility': 'V2Visibility', + 'pinned': 'bool', + 'parent_id': 'int', + 'resources': 'list[V2Resource]', + 'relations': 'list[V2MemoRelation]', + 'reactions': 'list[Apiv2Reaction]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'row_status': 'rowStatus', + 'creator': 'creator', + 'creator_id': 'creatorId', + 'create_time': 'createTime', + 'update_time': 'updateTime', + 'display_time': 'displayTime', + 'content': 'content', + 'visibility': 'visibility', + 'pinned': 'pinned', + 'parent_id': 'parentId', + 'resources': 'resources', + 'relations': 'relations', + 'reactions': 'reactions' + } + + def __init__(self, id=None, name=None, row_status=None, creator=None, creator_id=None, create_time=None, update_time=None, display_time=None, content=None, visibility=None, pinned=None, parent_id=None, resources=None, relations=None, reactions=None): # noqa: E501 + """V2Memo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._row_status = None + self._creator = None + self._creator_id = None + self._create_time = None + self._update_time = None + self._display_time = None + self._content = None + self._visibility = None + self._pinned = None + self._parent_id = None + self._resources = None + self._relations = None + self._reactions = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if row_status is not None: + self.row_status = row_status + if creator is not None: + self.creator = creator + if creator_id is not None: + self.creator_id = creator_id + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + if display_time is not None: + self.display_time = display_time + if content is not None: + self.content = content + if visibility is not None: + self.visibility = visibility + if pinned is not None: + self.pinned = pinned + if parent_id is not None: + self.parent_id = parent_id + if resources is not None: + self.resources = resources + if relations is not None: + self.relations = relations + if reactions is not None: + self.reactions = reactions + + @property + def id(self): + """Gets the id of this V2Memo. # noqa: E501 + + id is the system generated unique identifier. # noqa: E501 + + :return: The id of this V2Memo. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V2Memo. + + id is the system generated unique identifier. # noqa: E501 + + :param id: The id of this V2Memo. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this V2Memo. # noqa: E501 + + name is the user provided name. # noqa: E501 + + :return: The name of this V2Memo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2Memo. + + name is the user provided name. # noqa: E501 + + :param name: The name of this V2Memo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def row_status(self): + """Gets the row_status of this V2Memo. # noqa: E501 + + + :return: The row_status of this V2Memo. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this V2Memo. + + + :param row_status: The row_status of this V2Memo. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def creator(self): + """Gets the creator of this V2Memo. # noqa: E501 + + + :return: The creator of this V2Memo. # noqa: E501 + :rtype: str + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this V2Memo. + + + :param creator: The creator of this V2Memo. # noqa: E501 + :type: str + """ + + self._creator = creator + + @property + def creator_id(self): + """Gets the creator_id of this V2Memo. # noqa: E501 + + + :return: The creator_id of this V2Memo. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this V2Memo. + + + :param creator_id: The creator_id of this V2Memo. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def create_time(self): + """Gets the create_time of this V2Memo. # noqa: E501 + + + :return: The create_time of this V2Memo. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2Memo. + + + :param create_time: The create_time of this V2Memo. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this V2Memo. # noqa: E501 + + + :return: The update_time of this V2Memo. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this V2Memo. + + + :param update_time: The update_time of this V2Memo. # noqa: E501 + :type: datetime + """ + + self._update_time = update_time + + @property + def display_time(self): + """Gets the display_time of this V2Memo. # noqa: E501 + + + :return: The display_time of this V2Memo. # noqa: E501 + :rtype: datetime + """ + return self._display_time + + @display_time.setter + def display_time(self, display_time): + """Sets the display_time of this V2Memo. + + + :param display_time: The display_time of this V2Memo. # noqa: E501 + :type: datetime + """ + + self._display_time = display_time + + @property + def content(self): + """Gets the content of this V2Memo. # noqa: E501 + + + :return: The content of this V2Memo. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this V2Memo. + + + :param content: The content of this V2Memo. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def visibility(self): + """Gets the visibility of this V2Memo. # noqa: E501 + + + :return: The visibility of this V2Memo. # noqa: E501 + :rtype: V2Visibility + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this V2Memo. + + + :param visibility: The visibility of this V2Memo. # noqa: E501 + :type: V2Visibility + """ + + self._visibility = visibility + + @property + def pinned(self): + """Gets the pinned of this V2Memo. # noqa: E501 + + + :return: The pinned of this V2Memo. # noqa: E501 + :rtype: bool + """ + return self._pinned + + @pinned.setter + def pinned(self, pinned): + """Sets the pinned of this V2Memo. + + + :param pinned: The pinned of this V2Memo. # noqa: E501 + :type: bool + """ + + self._pinned = pinned + + @property + def parent_id(self): + """Gets the parent_id of this V2Memo. # noqa: E501 + + + :return: The parent_id of this V2Memo. # noqa: E501 + :rtype: int + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + """Sets the parent_id of this V2Memo. + + + :param parent_id: The parent_id of this V2Memo. # noqa: E501 + :type: int + """ + + self._parent_id = parent_id + + @property + def resources(self): + """Gets the resources of this V2Memo. # noqa: E501 + + + :return: The resources of this V2Memo. # noqa: E501 + :rtype: list[V2Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V2Memo. + + + :param resources: The resources of this V2Memo. # noqa: E501 + :type: list[V2Resource] + """ + + self._resources = resources + + @property + def relations(self): + """Gets the relations of this V2Memo. # noqa: E501 + + + :return: The relations of this V2Memo. # noqa: E501 + :rtype: list[V2MemoRelation] + """ + return self._relations + + @relations.setter + def relations(self, relations): + """Sets the relations of this V2Memo. + + + :param relations: The relations of this V2Memo. # noqa: E501 + :type: list[V2MemoRelation] + """ + + self._relations = relations + + @property + def reactions(self): + """Gets the reactions of this V2Memo. # noqa: E501 + + + :return: The reactions of this V2Memo. # noqa: E501 + :rtype: list[Apiv2Reaction] + """ + return self._reactions + + @reactions.setter + def reactions(self, reactions): + """Sets the reactions of this V2Memo. + + + :param reactions: The reactions of this V2Memo. # noqa: E501 + :type: list[Apiv2Reaction] + """ + + self._reactions = reactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Memo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Memo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_memo_relation.py b/memos/models/v2_memo_relation.py new file mode 100644 index 0000000..40093df --- /dev/null +++ b/memos/models/v2_memo_relation.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2MemoRelation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo_id': 'int', + 'related_memo_id': 'int', + 'type': 'V2MemoRelationType' + } + + attribute_map = { + 'memo_id': 'memoId', + 'related_memo_id': 'relatedMemoId', + 'type': 'type' + } + + def __init__(self, memo_id=None, related_memo_id=None, type=None): # noqa: E501 + """V2MemoRelation - a model defined in Swagger""" # noqa: E501 + self._memo_id = None + self._related_memo_id = None + self._type = None + self.discriminator = None + if memo_id is not None: + self.memo_id = memo_id + if related_memo_id is not None: + self.related_memo_id = related_memo_id + if type is not None: + self.type = type + + @property + def memo_id(self): + """Gets the memo_id of this V2MemoRelation. # noqa: E501 + + + :return: The memo_id of this V2MemoRelation. # noqa: E501 + :rtype: int + """ + return self._memo_id + + @memo_id.setter + def memo_id(self, memo_id): + """Sets the memo_id of this V2MemoRelation. + + + :param memo_id: The memo_id of this V2MemoRelation. # noqa: E501 + :type: int + """ + + self._memo_id = memo_id + + @property + def related_memo_id(self): + """Gets the related_memo_id of this V2MemoRelation. # noqa: E501 + + + :return: The related_memo_id of this V2MemoRelation. # noqa: E501 + :rtype: int + """ + return self._related_memo_id + + @related_memo_id.setter + def related_memo_id(self, related_memo_id): + """Sets the related_memo_id of this V2MemoRelation. + + + :param related_memo_id: The related_memo_id of this V2MemoRelation. # noqa: E501 + :type: int + """ + + self._related_memo_id = related_memo_id + + @property + def type(self): + """Gets the type of this V2MemoRelation. # noqa: E501 + + + :return: The type of this V2MemoRelation. # noqa: E501 + :rtype: V2MemoRelationType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V2MemoRelation. + + + :param type: The type of this V2MemoRelation. # noqa: E501 + :type: V2MemoRelationType + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2MemoRelation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2MemoRelation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_memo_relation_type.py b/memos/models/v2_memo_relation_type.py new file mode 100644 index 0000000..72480f8 --- /dev/null +++ b/memos/models/v2_memo_relation_type.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2MemoRelationType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED" + REFERENCE = "REFERENCE" + COMMENT = "COMMENT" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2MemoRelationType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2MemoRelationType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2MemoRelationType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_rename_tag_response.py b/memos/models/v2_rename_tag_response.py new file mode 100644 index 0000000..858377a --- /dev/null +++ b/memos/models/v2_rename_tag_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2RenameTagResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tag': 'V2Tag' + } + + attribute_map = { + 'tag': 'tag' + } + + def __init__(self, tag=None): # noqa: E501 + """V2RenameTagResponse - a model defined in Swagger""" # noqa: E501 + self._tag = None + self.discriminator = None + if tag is not None: + self.tag = tag + + @property + def tag(self): + """Gets the tag of this V2RenameTagResponse. # noqa: E501 + + + :return: The tag of this V2RenameTagResponse. # noqa: E501 + :rtype: V2Tag + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this V2RenameTagResponse. + + + :param tag: The tag of this V2RenameTagResponse. # noqa: E501 + :type: V2Tag + """ + + self._tag = tag + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2RenameTagResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2RenameTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_resource.py b/memos/models/v2_resource.py new file mode 100644 index 0000000..5b0f213 --- /dev/null +++ b/memos/models/v2_resource.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Resource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'name': 'str', + 'create_time': 'datetime', + 'filename': 'str', + 'external_link': 'str', + 'type': 'str', + 'size': 'str', + 'memo_id': 'int' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'create_time': 'createTime', + 'filename': 'filename', + 'external_link': 'externalLink', + 'type': 'type', + 'size': 'size', + 'memo_id': 'memoId' + } + + def __init__(self, id=None, name=None, create_time=None, filename=None, external_link=None, type=None, size=None, memo_id=None): # noqa: E501 + """V2Resource - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._create_time = None + self._filename = None + self._external_link = None + self._type = None + self._size = None + self._memo_id = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if create_time is not None: + self.create_time = create_time + if filename is not None: + self.filename = filename + if external_link is not None: + self.external_link = external_link + if type is not None: + self.type = type + if size is not None: + self.size = size + if memo_id is not None: + self.memo_id = memo_id + + @property + def id(self): + """Gets the id of this V2Resource. # noqa: E501 + + id is the system generated unique identifier. # noqa: E501 + + :return: The id of this V2Resource. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V2Resource. + + id is the system generated unique identifier. # noqa: E501 + + :param id: The id of this V2Resource. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this V2Resource. # noqa: E501 + + name is the user provided name. # noqa: E501 + + :return: The name of this V2Resource. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2Resource. + + name is the user provided name. # noqa: E501 + + :param name: The name of this V2Resource. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def create_time(self): + """Gets the create_time of this V2Resource. # noqa: E501 + + + :return: The create_time of this V2Resource. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2Resource. + + + :param create_time: The create_time of this V2Resource. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def filename(self): + """Gets the filename of this V2Resource. # noqa: E501 + + + :return: The filename of this V2Resource. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this V2Resource. + + + :param filename: The filename of this V2Resource. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def external_link(self): + """Gets the external_link of this V2Resource. # noqa: E501 + + + :return: The external_link of this V2Resource. # noqa: E501 + :rtype: str + """ + return self._external_link + + @external_link.setter + def external_link(self, external_link): + """Sets the external_link of this V2Resource. + + + :param external_link: The external_link of this V2Resource. # noqa: E501 + :type: str + """ + + self._external_link = external_link + + @property + def type(self): + """Gets the type of this V2Resource. # noqa: E501 + + + :return: The type of this V2Resource. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V2Resource. + + + :param type: The type of this V2Resource. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def size(self): + """Gets the size of this V2Resource. # noqa: E501 + + + :return: The size of this V2Resource. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this V2Resource. + + + :param size: The size of this V2Resource. # noqa: E501 + :type: str + """ + + self._size = size + + @property + def memo_id(self): + """Gets the memo_id of this V2Resource. # noqa: E501 + + + :return: The memo_id of this V2Resource. # noqa: E501 + :rtype: int + """ + return self._memo_id + + @memo_id.setter + def memo_id(self, memo_id): + """Sets the memo_id of this V2Resource. + + + :param memo_id: The memo_id of this V2Resource. # noqa: E501 + :type: int + """ + + self._memo_id = memo_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Resource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Resource): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_set_memo_relations_response.py b/memos/models/v2_set_memo_relations_response.py new file mode 100644 index 0000000..242d73a --- /dev/null +++ b/memos/models/v2_set_memo_relations_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SetMemoRelationsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2SetMemoRelationsResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SetMemoRelationsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SetMemoRelationsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_set_memo_resources_response.py b/memos/models/v2_set_memo_resources_response.py new file mode 100644 index 0000000..f13c729 --- /dev/null +++ b/memos/models/v2_set_memo_resources_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SetMemoResourcesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2SetMemoResourcesResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SetMemoResourcesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SetMemoResourcesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_set_workspace_setting_response.py b/memos/models/v2_set_workspace_setting_response.py new file mode 100644 index 0000000..2536c8b --- /dev/null +++ b/memos/models/v2_set_workspace_setting_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SetWorkspaceSettingResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'setting': 'Apiv2WorkspaceSetting' + } + + attribute_map = { + 'setting': 'setting' + } + + def __init__(self, setting=None): # noqa: E501 + """V2SetWorkspaceSettingResponse - a model defined in Swagger""" # noqa: E501 + self._setting = None + self.discriminator = None + if setting is not None: + self.setting = setting + + @property + def setting(self): + """Gets the setting of this V2SetWorkspaceSettingResponse. # noqa: E501 + + + :return: The setting of this V2SetWorkspaceSettingResponse. # noqa: E501 + :rtype: Apiv2WorkspaceSetting + """ + return self._setting + + @setting.setter + def setting(self, setting): + """Sets the setting of this V2SetWorkspaceSettingResponse. + + + :param setting: The setting of this V2SetWorkspaceSettingResponse. # noqa: E501 + :type: Apiv2WorkspaceSetting + """ + + self._setting = setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SetWorkspaceSettingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SetWorkspaceSettingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_setting_name_body.py b/memos/models/v2_setting_name_body.py new file mode 100644 index 0000000..3914671 --- /dev/null +++ b/memos/models/v2_setting_name_body.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SettingNameBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'locale': 'str', + 'appearance': 'str', + 'memo_visibility': 'str', + 'telegram_user_id': 'str' + } + + attribute_map = { + 'locale': 'locale', + 'appearance': 'appearance', + 'memo_visibility': 'memoVisibility', + 'telegram_user_id': 'telegramUserId' + } + + def __init__(self, locale=None, appearance=None, memo_visibility=None, telegram_user_id=None): # noqa: E501 + """V2SettingNameBody - a model defined in Swagger""" # noqa: E501 + self._locale = None + self._appearance = None + self._memo_visibility = None + self._telegram_user_id = None + self.discriminator = None + if locale is not None: + self.locale = locale + if appearance is not None: + self.appearance = appearance + if memo_visibility is not None: + self.memo_visibility = memo_visibility + if telegram_user_id is not None: + self.telegram_user_id = telegram_user_id + + @property + def locale(self): + """Gets the locale of this V2SettingNameBody. # noqa: E501 + + The preferred locale of the user. # noqa: E501 + + :return: The locale of this V2SettingNameBody. # noqa: E501 + :rtype: str + """ + return self._locale + + @locale.setter + def locale(self, locale): + """Sets the locale of this V2SettingNameBody. + + The preferred locale of the user. # noqa: E501 + + :param locale: The locale of this V2SettingNameBody. # noqa: E501 + :type: str + """ + + self._locale = locale + + @property + def appearance(self): + """Gets the appearance of this V2SettingNameBody. # noqa: E501 + + The preferred appearance of the user. # noqa: E501 + + :return: The appearance of this V2SettingNameBody. # noqa: E501 + :rtype: str + """ + return self._appearance + + @appearance.setter + def appearance(self, appearance): + """Sets the appearance of this V2SettingNameBody. + + The preferred appearance of the user. # noqa: E501 + + :param appearance: The appearance of this V2SettingNameBody. # noqa: E501 + :type: str + """ + + self._appearance = appearance + + @property + def memo_visibility(self): + """Gets the memo_visibility of this V2SettingNameBody. # noqa: E501 + + The default visibility of the memo. # noqa: E501 + + :return: The memo_visibility of this V2SettingNameBody. # noqa: E501 + :rtype: str + """ + return self._memo_visibility + + @memo_visibility.setter + def memo_visibility(self, memo_visibility): + """Sets the memo_visibility of this V2SettingNameBody. + + The default visibility of the memo. # noqa: E501 + + :param memo_visibility: The memo_visibility of this V2SettingNameBody. # noqa: E501 + :type: str + """ + + self._memo_visibility = memo_visibility + + @property + def telegram_user_id(self): + """Gets the telegram_user_id of this V2SettingNameBody. # noqa: E501 + + The telegram user id of the user. # noqa: E501 + + :return: The telegram_user_id of this V2SettingNameBody. # noqa: E501 + :rtype: str + """ + return self._telegram_user_id + + @telegram_user_id.setter + def telegram_user_id(self, telegram_user_id): + """Sets the telegram_user_id of this V2SettingNameBody. + + The telegram user id of the user. # noqa: E501 + + :param telegram_user_id: The telegram_user_id of this V2SettingNameBody. # noqa: E501 + :type: str + """ + + self._telegram_user_id = telegram_user_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SettingNameBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SettingNameBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_sign_in_response.py b/memos/models/v2_sign_in_response.py new file mode 100644 index 0000000..884bc51 --- /dev/null +++ b/memos/models/v2_sign_in_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SignInResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2SignInResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2SignInResponse. # noqa: E501 + + + :return: The user of this V2SignInResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2SignInResponse. + + + :param user: The user of this V2SignInResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SignInResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SignInResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_sign_in_with_sso_response.py b/memos/models/v2_sign_in_with_sso_response.py new file mode 100644 index 0000000..20938cf --- /dev/null +++ b/memos/models/v2_sign_in_with_sso_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SignInWithSSOResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2SignInWithSSOResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2SignInWithSSOResponse. # noqa: E501 + + + :return: The user of this V2SignInWithSSOResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2SignInWithSSOResponse. + + + :param user: The user of this V2SignInWithSSOResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SignInWithSSOResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SignInWithSSOResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_sign_out_response.py b/memos/models/v2_sign_out_response.py new file mode 100644 index 0000000..0c964e3 --- /dev/null +++ b/memos/models/v2_sign_out_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SignOutResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2SignOutResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SignOutResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SignOutResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_sign_up_response.py b/memos/models/v2_sign_up_response.py new file mode 100644 index 0000000..a16c0c1 --- /dev/null +++ b/memos/models/v2_sign_up_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2SignUpResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2SignUpResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2SignUpResponse. # noqa: E501 + + + :return: The user of this V2SignUpResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2SignUpResponse. + + + :param user: The user of this V2SignUpResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2SignUpResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2SignUpResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_tag.py b/memos/models/v2_tag.py new file mode 100644 index 0000000..aeb1c0a --- /dev/null +++ b/memos/models/v2_tag.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Tag(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'creator': 'str' + } + + attribute_map = { + 'name': 'name', + 'creator': 'creator' + } + + def __init__(self, name=None, creator=None): # noqa: E501 + """V2Tag - a model defined in Swagger""" # noqa: E501 + self._name = None + self._creator = None + self.discriminator = None + if name is not None: + self.name = name + if creator is not None: + self.creator = creator + + @property + def name(self): + """Gets the name of this V2Tag. # noqa: E501 + + + :return: The name of this V2Tag. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2Tag. + + + :param name: The name of this V2Tag. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def creator(self): + """Gets the creator of this V2Tag. # noqa: E501 + + + :return: The creator of this V2Tag. # noqa: E501 + :rtype: str + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this V2Tag. + + + :param creator: The creator of this V2Tag. # noqa: E501 + :type: str + """ + + self._creator = creator + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Tag, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Tag): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_inbox_response.py b/memos/models/v2_update_inbox_response.py new file mode 100644 index 0000000..84260ed --- /dev/null +++ b/memos/models/v2_update_inbox_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateInboxResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'inbox': 'V2Inbox' + } + + attribute_map = { + 'inbox': 'inbox' + } + + def __init__(self, inbox=None): # noqa: E501 + """V2UpdateInboxResponse - a model defined in Swagger""" # noqa: E501 + self._inbox = None + self.discriminator = None + if inbox is not None: + self.inbox = inbox + + @property + def inbox(self): + """Gets the inbox of this V2UpdateInboxResponse. # noqa: E501 + + + :return: The inbox of this V2UpdateInboxResponse. # noqa: E501 + :rtype: V2Inbox + """ + return self._inbox + + @inbox.setter + def inbox(self, inbox): + """Sets the inbox of this V2UpdateInboxResponse. + + + :param inbox: The inbox of this V2UpdateInboxResponse. # noqa: E501 + :type: V2Inbox + """ + + self._inbox = inbox + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateInboxResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateInboxResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_memo_response.py b/memos/models/v2_update_memo_response.py new file mode 100644 index 0000000..243bbb8 --- /dev/null +++ b/memos/models/v2_update_memo_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateMemoResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memo': 'V2Memo' + } + + attribute_map = { + 'memo': 'memo' + } + + def __init__(self, memo=None): # noqa: E501 + """V2UpdateMemoResponse - a model defined in Swagger""" # noqa: E501 + self._memo = None + self.discriminator = None + if memo is not None: + self.memo = memo + + @property + def memo(self): + """Gets the memo of this V2UpdateMemoResponse. # noqa: E501 + + + :return: The memo of this V2UpdateMemoResponse. # noqa: E501 + :rtype: V2Memo + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this V2UpdateMemoResponse. + + + :param memo: The memo of this V2UpdateMemoResponse. # noqa: E501 + :type: V2Memo + """ + + self._memo = memo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateMemoResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateMemoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_resource_response.py b/memos/models/v2_update_resource_response.py new file mode 100644 index 0000000..546e36b --- /dev/null +++ b/memos/models/v2_update_resource_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateResourceResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource': 'V2Resource' + } + + attribute_map = { + 'resource': 'resource' + } + + def __init__(self, resource=None): # noqa: E501 + """V2UpdateResourceResponse - a model defined in Swagger""" # noqa: E501 + self._resource = None + self.discriminator = None + if resource is not None: + self.resource = resource + + @property + def resource(self): + """Gets the resource of this V2UpdateResourceResponse. # noqa: E501 + + + :return: The resource of this V2UpdateResourceResponse. # noqa: E501 + :rtype: V2Resource + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V2UpdateResourceResponse. + + + :param resource: The resource of this V2UpdateResourceResponse. # noqa: E501 + :type: V2Resource + """ + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateResourceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateResourceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_user_response.py b/memos/models/v2_update_user_response.py new file mode 100644 index 0000000..3321102 --- /dev/null +++ b/memos/models/v2_update_user_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateUserResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'V2User' + } + + attribute_map = { + 'user': 'user' + } + + def __init__(self, user=None): # noqa: E501 + """V2UpdateUserResponse - a model defined in Swagger""" # noqa: E501 + self._user = None + self.discriminator = None + if user is not None: + self.user = user + + @property + def user(self): + """Gets the user of this V2UpdateUserResponse. # noqa: E501 + + + :return: The user of this V2UpdateUserResponse. # noqa: E501 + :rtype: V2User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V2UpdateUserResponse. + + + :param user: The user of this V2UpdateUserResponse. # noqa: E501 + :type: V2User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateUserResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateUserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_user_setting_response.py b/memos/models/v2_update_user_setting_response.py new file mode 100644 index 0000000..4601666 --- /dev/null +++ b/memos/models/v2_update_user_setting_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateUserSettingResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'setting': 'Apiv2UserSetting' + } + + attribute_map = { + 'setting': 'setting' + } + + def __init__(self, setting=None): # noqa: E501 + """V2UpdateUserSettingResponse - a model defined in Swagger""" # noqa: E501 + self._setting = None + self.discriminator = None + if setting is not None: + self.setting = setting + + @property + def setting(self): + """Gets the setting of this V2UpdateUserSettingResponse. # noqa: E501 + + + :return: The setting of this V2UpdateUserSettingResponse. # noqa: E501 + :rtype: Apiv2UserSetting + """ + return self._setting + + @setting.setter + def setting(self, setting): + """Sets the setting of this V2UpdateUserSettingResponse. + + + :param setting: The setting of this V2UpdateUserSettingResponse. # noqa: E501 + :type: Apiv2UserSetting + """ + + self._setting = setting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateUserSettingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateUserSettingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_update_webhook_response.py b/memos/models/v2_update_webhook_response.py new file mode 100644 index 0000000..89b27ef --- /dev/null +++ b/memos/models/v2_update_webhook_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpdateWebhookResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'webhook': 'Apiv2Webhook' + } + + attribute_map = { + 'webhook': 'webhook' + } + + def __init__(self, webhook=None): # noqa: E501 + """V2UpdateWebhookResponse - a model defined in Swagger""" # noqa: E501 + self._webhook = None + self.discriminator = None + if webhook is not None: + self.webhook = webhook + + @property + def webhook(self): + """Gets the webhook of this V2UpdateWebhookResponse. # noqa: E501 + + + :return: The webhook of this V2UpdateWebhookResponse. # noqa: E501 + :rtype: Apiv2Webhook + """ + return self._webhook + + @webhook.setter + def webhook(self, webhook): + """Sets the webhook of this V2UpdateWebhookResponse. + + + :param webhook: The webhook of this V2UpdateWebhookResponse. # noqa: E501 + :type: Apiv2Webhook + """ + + self._webhook = webhook + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpdateWebhookResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpdateWebhookResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_upsert_memo_reaction_response.py b/memos/models/v2_upsert_memo_reaction_response.py new file mode 100644 index 0000000..556556d --- /dev/null +++ b/memos/models/v2_upsert_memo_reaction_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpsertMemoReactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'reaction': 'Apiv2Reaction' + } + + attribute_map = { + 'reaction': 'reaction' + } + + def __init__(self, reaction=None): # noqa: E501 + """V2UpsertMemoReactionResponse - a model defined in Swagger""" # noqa: E501 + self._reaction = None + self.discriminator = None + if reaction is not None: + self.reaction = reaction + + @property + def reaction(self): + """Gets the reaction of this V2UpsertMemoReactionResponse. # noqa: E501 + + + :return: The reaction of this V2UpsertMemoReactionResponse. # noqa: E501 + :rtype: Apiv2Reaction + """ + return self._reaction + + @reaction.setter + def reaction(self, reaction): + """Sets the reaction of this V2UpsertMemoReactionResponse. + + + :param reaction: The reaction of this V2UpsertMemoReactionResponse. # noqa: E501 + :type: Apiv2Reaction + """ + + self._reaction = reaction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpsertMemoReactionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpsertMemoReactionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_upsert_tag_request.py b/memos/models/v2_upsert_tag_request.py new file mode 100644 index 0000000..605b587 --- /dev/null +++ b/memos/models/v2_upsert_tag_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpsertTagRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """V2UpsertTagRequest - a model defined in Swagger""" # noqa: E501 + self._name = None + self.discriminator = None + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this V2UpsertTagRequest. # noqa: E501 + + + :return: The name of this V2UpsertTagRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2UpsertTagRequest. + + + :param name: The name of this V2UpsertTagRequest. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpsertTagRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpsertTagRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_upsert_tag_response.py b/memos/models/v2_upsert_tag_response.py new file mode 100644 index 0000000..22bc115 --- /dev/null +++ b/memos/models/v2_upsert_tag_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UpsertTagResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tag': 'V2Tag' + } + + attribute_map = { + 'tag': 'tag' + } + + def __init__(self, tag=None): # noqa: E501 + """V2UpsertTagResponse - a model defined in Swagger""" # noqa: E501 + self._tag = None + self.discriminator = None + if tag is not None: + self.tag = tag + + @property + def tag(self): + """Gets the tag of this V2UpsertTagResponse. # noqa: E501 + + + :return: The tag of this V2UpsertTagResponse. # noqa: E501 + :rtype: V2Tag + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this V2UpsertTagResponse. + + + :param tag: The tag of this V2UpsertTagResponse. # noqa: E501 + :type: V2Tag + """ + + self._tag = tag + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UpsertTagResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UpsertTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_user.py b/memos/models/v2_user.py new file mode 100644 index 0000000..b6e7b34 --- /dev/null +++ b/memos/models/v2_user.py @@ -0,0 +1,370 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2User(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'int', + 'role': 'UserRole', + 'username': 'str', + 'email': 'str', + 'nickname': 'str', + 'avatar_url': 'str', + 'password': 'str', + 'row_status': 'Apiv2RowStatus', + 'create_time': 'datetime', + 'update_time': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'role': 'role', + 'username': 'username', + 'email': 'email', + 'nickname': 'nickname', + 'avatar_url': 'avatarUrl', + 'password': 'password', + 'row_status': 'rowStatus', + 'create_time': 'createTime', + 'update_time': 'updateTime' + } + + def __init__(self, name=None, id=None, role=None, username=None, email=None, nickname=None, avatar_url=None, password=None, row_status=None, create_time=None, update_time=None): # noqa: E501 + """V2User - a model defined in Swagger""" # noqa: E501 + self._name = None + self._id = None + self._role = None + self._username = None + self._email = None + self._nickname = None + self._avatar_url = None + self._password = None + self._row_status = None + self._create_time = None + self._update_time = None + self.discriminator = None + if name is not None: + self.name = name + if id is not None: + self.id = id + if role is not None: + self.role = role + if username is not None: + self.username = username + if email is not None: + self.email = email + if nickname is not None: + self.nickname = nickname + if avatar_url is not None: + self.avatar_url = avatar_url + if password is not None: + self.password = password + if row_status is not None: + self.row_status = row_status + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + + @property + def name(self): + """Gets the name of this V2User. # noqa: E501 + + + :return: The name of this V2User. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V2User. + + + :param name: The name of this V2User. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this V2User. # noqa: E501 + + + :return: The id of this V2User. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V2User. + + + :param id: The id of this V2User. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def role(self): + """Gets the role of this V2User. # noqa: E501 + + + :return: The role of this V2User. # noqa: E501 + :rtype: UserRole + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this V2User. + + + :param role: The role of this V2User. # noqa: E501 + :type: UserRole + """ + + self._role = role + + @property + def username(self): + """Gets the username of this V2User. # noqa: E501 + + + :return: The username of this V2User. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this V2User. + + + :param username: The username of this V2User. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def email(self): + """Gets the email of this V2User. # noqa: E501 + + + :return: The email of this V2User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this V2User. + + + :param email: The email of this V2User. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def nickname(self): + """Gets the nickname of this V2User. # noqa: E501 + + + :return: The nickname of this V2User. # noqa: E501 + :rtype: str + """ + return self._nickname + + @nickname.setter + def nickname(self, nickname): + """Sets the nickname of this V2User. + + + :param nickname: The nickname of this V2User. # noqa: E501 + :type: str + """ + + self._nickname = nickname + + @property + def avatar_url(self): + """Gets the avatar_url of this V2User. # noqa: E501 + + + :return: The avatar_url of this V2User. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this V2User. + + + :param avatar_url: The avatar_url of this V2User. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def password(self): + """Gets the password of this V2User. # noqa: E501 + + + :return: The password of this V2User. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this V2User. + + + :param password: The password of this V2User. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def row_status(self): + """Gets the row_status of this V2User. # noqa: E501 + + + :return: The row_status of this V2User. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this V2User. + + + :param row_status: The row_status of this V2User. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def create_time(self): + """Gets the create_time of this V2User. # noqa: E501 + + + :return: The create_time of this V2User. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2User. + + + :param create_time: The create_time of this V2User. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this V2User. # noqa: E501 + + + :return: The update_time of this V2User. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this V2User. + + + :param update_time: The update_time of this V2User. # noqa: E501 + :type: datetime + """ + + self._update_time = update_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2User, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2User): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_user_access_token.py b/memos/models/v2_user_access_token.py new file mode 100644 index 0000000..08ae408 --- /dev/null +++ b/memos/models/v2_user_access_token.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UserAccessToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_token': 'str', + 'description': 'str', + 'issued_at': 'datetime', + 'expires_at': 'datetime' + } + + attribute_map = { + 'access_token': 'accessToken', + 'description': 'description', + 'issued_at': 'issuedAt', + 'expires_at': 'expiresAt' + } + + def __init__(self, access_token=None, description=None, issued_at=None, expires_at=None): # noqa: E501 + """V2UserAccessToken - a model defined in Swagger""" # noqa: E501 + self._access_token = None + self._description = None + self._issued_at = None + self._expires_at = None + self.discriminator = None + if access_token is not None: + self.access_token = access_token + if description is not None: + self.description = description + if issued_at is not None: + self.issued_at = issued_at + if expires_at is not None: + self.expires_at = expires_at + + @property + def access_token(self): + """Gets the access_token of this V2UserAccessToken. # noqa: E501 + + + :return: The access_token of this V2UserAccessToken. # noqa: E501 + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this V2UserAccessToken. + + + :param access_token: The access_token of this V2UserAccessToken. # noqa: E501 + :type: str + """ + + self._access_token = access_token + + @property + def description(self): + """Gets the description of this V2UserAccessToken. # noqa: E501 + + + :return: The description of this V2UserAccessToken. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V2UserAccessToken. + + + :param description: The description of this V2UserAccessToken. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def issued_at(self): + """Gets the issued_at of this V2UserAccessToken. # noqa: E501 + + + :return: The issued_at of this V2UserAccessToken. # noqa: E501 + :rtype: datetime + """ + return self._issued_at + + @issued_at.setter + def issued_at(self, issued_at): + """Sets the issued_at of this V2UserAccessToken. + + + :param issued_at: The issued_at of this V2UserAccessToken. # noqa: E501 + :type: datetime + """ + + self._issued_at = issued_at + + @property + def expires_at(self): + """Gets the expires_at of this V2UserAccessToken. # noqa: E501 + + + :return: The expires_at of this V2UserAccessToken. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this V2UserAccessToken. + + + :param expires_at: The expires_at of this V2UserAccessToken. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UserAccessToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UserAccessToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_user_name_body.py b/memos/models/v2_user_name_body.py new file mode 100644 index 0000000..431cc55 --- /dev/null +++ b/memos/models/v2_user_name_body.py @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2UserNameBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'role': 'UserRole', + 'username': 'str', + 'email': 'str', + 'nickname': 'str', + 'avatar_url': 'str', + 'password': 'str', + 'row_status': 'Apiv2RowStatus', + 'create_time': 'datetime', + 'update_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'role': 'role', + 'username': 'username', + 'email': 'email', + 'nickname': 'nickname', + 'avatar_url': 'avatarUrl', + 'password': 'password', + 'row_status': 'rowStatus', + 'create_time': 'createTime', + 'update_time': 'updateTime' + } + + def __init__(self, id=None, role=None, username=None, email=None, nickname=None, avatar_url=None, password=None, row_status=None, create_time=None, update_time=None): # noqa: E501 + """V2UserNameBody - a model defined in Swagger""" # noqa: E501 + self._id = None + self._role = None + self._username = None + self._email = None + self._nickname = None + self._avatar_url = None + self._password = None + self._row_status = None + self._create_time = None + self._update_time = None + self.discriminator = None + if id is not None: + self.id = id + if role is not None: + self.role = role + if username is not None: + self.username = username + if email is not None: + self.email = email + if nickname is not None: + self.nickname = nickname + if avatar_url is not None: + self.avatar_url = avatar_url + if password is not None: + self.password = password + if row_status is not None: + self.row_status = row_status + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + + @property + def id(self): + """Gets the id of this V2UserNameBody. # noqa: E501 + + + :return: The id of this V2UserNameBody. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V2UserNameBody. + + + :param id: The id of this V2UserNameBody. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def role(self): + """Gets the role of this V2UserNameBody. # noqa: E501 + + + :return: The role of this V2UserNameBody. # noqa: E501 + :rtype: UserRole + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this V2UserNameBody. + + + :param role: The role of this V2UserNameBody. # noqa: E501 + :type: UserRole + """ + + self._role = role + + @property + def username(self): + """Gets the username of this V2UserNameBody. # noqa: E501 + + + :return: The username of this V2UserNameBody. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this V2UserNameBody. + + + :param username: The username of this V2UserNameBody. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def email(self): + """Gets the email of this V2UserNameBody. # noqa: E501 + + + :return: The email of this V2UserNameBody. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this V2UserNameBody. + + + :param email: The email of this V2UserNameBody. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def nickname(self): + """Gets the nickname of this V2UserNameBody. # noqa: E501 + + + :return: The nickname of this V2UserNameBody. # noqa: E501 + :rtype: str + """ + return self._nickname + + @nickname.setter + def nickname(self, nickname): + """Sets the nickname of this V2UserNameBody. + + + :param nickname: The nickname of this V2UserNameBody. # noqa: E501 + :type: str + """ + + self._nickname = nickname + + @property + def avatar_url(self): + """Gets the avatar_url of this V2UserNameBody. # noqa: E501 + + + :return: The avatar_url of this V2UserNameBody. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this V2UserNameBody. + + + :param avatar_url: The avatar_url of this V2UserNameBody. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def password(self): + """Gets the password of this V2UserNameBody. # noqa: E501 + + + :return: The password of this V2UserNameBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this V2UserNameBody. + + + :param password: The password of this V2UserNameBody. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def row_status(self): + """Gets the row_status of this V2UserNameBody. # noqa: E501 + + + :return: The row_status of this V2UserNameBody. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this V2UserNameBody. + + + :param row_status: The row_status of this V2UserNameBody. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def create_time(self): + """Gets the create_time of this V2UserNameBody. # noqa: E501 + + + :return: The create_time of this V2UserNameBody. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V2UserNameBody. + + + :param create_time: The create_time of this V2UserNameBody. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this V2UserNameBody. # noqa: E501 + + + :return: The update_time of this V2UserNameBody. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this V2UserNameBody. + + + :param update_time: The update_time of this V2UserNameBody. # noqa: E501 + :type: datetime + """ + + self._update_time = update_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2UserNameBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2UserNameBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_visibility.py b/memos/models/v2_visibility.py new file mode 100644 index 0000000..d940489 --- /dev/null +++ b/memos/models/v2_visibility.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2Visibility(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + VISIBILITY_UNSPECIFIED = "VISIBILITY_UNSPECIFIED" + PRIVATE = "PRIVATE" + PROTECTED = "PROTECTED" + PUBLIC = "PUBLIC" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V2Visibility - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2Visibility, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2Visibility): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/v2_workspace_profile.py b/memos/models/v2_workspace_profile.py new file mode 100644 index 0000000..9148fe5 --- /dev/null +++ b/memos/models/v2_workspace_profile.py @@ -0,0 +1,250 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class V2WorkspaceProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'version': 'str', + 'mode': 'str', + 'allow_registration': 'bool', + 'disable_password_login': 'bool', + 'additional_script': 'str', + 'additional_style': 'str' + } + + attribute_map = { + 'version': 'version', + 'mode': 'mode', + 'allow_registration': 'allowRegistration', + 'disable_password_login': 'disablePasswordLogin', + 'additional_script': 'additionalScript', + 'additional_style': 'additionalStyle' + } + + def __init__(self, version=None, mode=None, allow_registration=None, disable_password_login=None, additional_script=None, additional_style=None): # noqa: E501 + """V2WorkspaceProfile - a model defined in Swagger""" # noqa: E501 + self._version = None + self._mode = None + self._allow_registration = None + self._disable_password_login = None + self._additional_script = None + self._additional_style = None + self.discriminator = None + if version is not None: + self.version = version + if mode is not None: + self.mode = mode + if allow_registration is not None: + self.allow_registration = allow_registration + if disable_password_login is not None: + self.disable_password_login = disable_password_login + if additional_script is not None: + self.additional_script = additional_script + if additional_style is not None: + self.additional_style = additional_style + + @property + def version(self): + """Gets the version of this V2WorkspaceProfile. # noqa: E501 + + + :return: The version of this V2WorkspaceProfile. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this V2WorkspaceProfile. + + + :param version: The version of this V2WorkspaceProfile. # noqa: E501 + :type: str + """ + + self._version = version + + @property + def mode(self): + """Gets the mode of this V2WorkspaceProfile. # noqa: E501 + + mode is the instance mode (e.g. \"prod\", \"dev\" or \"demo\"). # noqa: E501 + + :return: The mode of this V2WorkspaceProfile. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this V2WorkspaceProfile. + + mode is the instance mode (e.g. \"prod\", \"dev\" or \"demo\"). # noqa: E501 + + :param mode: The mode of this V2WorkspaceProfile. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def allow_registration(self): + """Gets the allow_registration of this V2WorkspaceProfile. # noqa: E501 + + allow_registration is whether the registration is allowed. # noqa: E501 + + :return: The allow_registration of this V2WorkspaceProfile. # noqa: E501 + :rtype: bool + """ + return self._allow_registration + + @allow_registration.setter + def allow_registration(self, allow_registration): + """Sets the allow_registration of this V2WorkspaceProfile. + + allow_registration is whether the registration is allowed. # noqa: E501 + + :param allow_registration: The allow_registration of this V2WorkspaceProfile. # noqa: E501 + :type: bool + """ + + self._allow_registration = allow_registration + + @property + def disable_password_login(self): + """Gets the disable_password_login of this V2WorkspaceProfile. # noqa: E501 + + allow_password_login is whether the password login is allowed. # noqa: E501 + + :return: The disable_password_login of this V2WorkspaceProfile. # noqa: E501 + :rtype: bool + """ + return self._disable_password_login + + @disable_password_login.setter + def disable_password_login(self, disable_password_login): + """Sets the disable_password_login of this V2WorkspaceProfile. + + allow_password_login is whether the password login is allowed. # noqa: E501 + + :param disable_password_login: The disable_password_login of this V2WorkspaceProfile. # noqa: E501 + :type: bool + """ + + self._disable_password_login = disable_password_login + + @property + def additional_script(self): + """Gets the additional_script of this V2WorkspaceProfile. # noqa: E501 + + additional_script is the additional script. # noqa: E501 + + :return: The additional_script of this V2WorkspaceProfile. # noqa: E501 + :rtype: str + """ + return self._additional_script + + @additional_script.setter + def additional_script(self, additional_script): + """Sets the additional_script of this V2WorkspaceProfile. + + additional_script is the additional script. # noqa: E501 + + :param additional_script: The additional_script of this V2WorkspaceProfile. # noqa: E501 + :type: str + """ + + self._additional_script = additional_script + + @property + def additional_style(self): + """Gets the additional_style of this V2WorkspaceProfile. # noqa: E501 + + additional_style is the additional style. # noqa: E501 + + :return: The additional_style of this V2WorkspaceProfile. # noqa: E501 + :rtype: str + """ + return self._additional_style + + @additional_style.setter + def additional_style(self, additional_style): + """Sets the additional_style of this V2WorkspaceProfile. + + additional_style is the additional style. # noqa: E501 + + :param additional_style: The additional_style of this V2WorkspaceProfile. # noqa: E501 + :type: str + """ + + self._additional_style = additional_style + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V2WorkspaceProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V2WorkspaceProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/models/webhooks_webhook_id_body.py b/memos/models/webhooks_webhook_id_body.py new file mode 100644 index 0000000..1de8879 --- /dev/null +++ b/memos/models/webhooks_webhook_id_body.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class WebhooksWebhookIdBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'creator_id': 'int', + 'created_time': 'datetime', + 'updated_time': 'datetime', + 'row_status': 'Apiv2RowStatus', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'creator_id': 'creatorId', + 'created_time': 'createdTime', + 'updated_time': 'updatedTime', + 'row_status': 'rowStatus', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, creator_id=None, created_time=None, updated_time=None, row_status=None, name=None, url=None): # noqa: E501 + """WebhooksWebhookIdBody - a model defined in Swagger""" # noqa: E501 + self._creator_id = None + self._created_time = None + self._updated_time = None + self._row_status = None + self._name = None + self._url = None + self.discriminator = None + if creator_id is not None: + self.creator_id = creator_id + if created_time is not None: + self.created_time = created_time + if updated_time is not None: + self.updated_time = updated_time + if row_status is not None: + self.row_status = row_status + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def creator_id(self): + """Gets the creator_id of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The creator_id of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this WebhooksWebhookIdBody. + + + :param creator_id: The creator_id of this WebhooksWebhookIdBody. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def created_time(self): + """Gets the created_time of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The created_time of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: datetime + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this WebhooksWebhookIdBody. + + + :param created_time: The created_time of this WebhooksWebhookIdBody. # noqa: E501 + :type: datetime + """ + + self._created_time = created_time + + @property + def updated_time(self): + """Gets the updated_time of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The updated_time of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: datetime + """ + return self._updated_time + + @updated_time.setter + def updated_time(self, updated_time): + """Sets the updated_time of this WebhooksWebhookIdBody. + + + :param updated_time: The updated_time of this WebhooksWebhookIdBody. # noqa: E501 + :type: datetime + """ + + self._updated_time = updated_time + + @property + def row_status(self): + """Gets the row_status of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The row_status of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: Apiv2RowStatus + """ + return self._row_status + + @row_status.setter + def row_status(self, row_status): + """Sets the row_status of this WebhooksWebhookIdBody. + + + :param row_status: The row_status of this WebhooksWebhookIdBody. # noqa: E501 + :type: Apiv2RowStatus + """ + + self._row_status = row_status + + @property + def name(self): + """Gets the name of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The name of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhooksWebhookIdBody. + + + :param name: The name of this WebhooksWebhookIdBody. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this WebhooksWebhookIdBody. # noqa: E501 + + + :return: The url of this WebhooksWebhookIdBody. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebhooksWebhookIdBody. + + + :param url: The url of this WebhooksWebhookIdBody. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(WebhooksWebhookIdBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhooksWebhookIdBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/memos/rest.py b/memos/rest.py new file mode 100644 index 0000000..cb93aa3 --- /dev/null +++ b/memos/rest.py @@ -0,0 +1,317 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = '{}' + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..62dfb6a --- /dev/null +++ b/setup.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "memos-python" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="api/v2/activity_service.proto", + author_email="", + url="https://github.com/looching/memos-python", + keywords=["Swagger", "api/v2/activity_service.proto"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + """ +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..576f56f --- /dev/null +++ b/test/__init__.py @@ -0,0 +1 @@ +# coding: utf-8 \ No newline at end of file diff --git a/test/test_activity_service_api.py b/test/test_activity_service_api.py new file mode 100644 index 0000000..073d089 --- /dev/null +++ b/test/test_activity_service_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.activity_service_api import ActivityServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestActivityServiceApi(unittest.TestCase): + """ActivityServiceApi unit test stubs""" + + def setUp(self): + self.api = ActivityServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_activity_service_get_activity(self): + """Test case for activity_service_get_activity + + GetActivity returns the activity with the given id. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_activity_memo_comment_payload.py b/test/test_apiv2_activity_memo_comment_payload.py new file mode 100644 index 0000000..e1d7486 --- /dev/null +++ b/test/test_apiv2_activity_memo_comment_payload.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_activity_memo_comment_payload import Apiv2ActivityMemoCommentPayload # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2ActivityMemoCommentPayload(unittest.TestCase): + """Apiv2ActivityMemoCommentPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2ActivityMemoCommentPayload(self): + """Test Apiv2ActivityMemoCommentPayload""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_activity_memo_comment_payload.Apiv2ActivityMemoCommentPayload() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_activity_payload.py b/test/test_apiv2_activity_payload.py new file mode 100644 index 0000000..d7f4188 --- /dev/null +++ b/test/test_apiv2_activity_payload.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_activity_payload import Apiv2ActivityPayload # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2ActivityPayload(unittest.TestCase): + """Apiv2ActivityPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2ActivityPayload(self): + """Test Apiv2ActivityPayload""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_activity_payload.Apiv2ActivityPayload() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_activity_version_update_payload.py b/test/test_apiv2_activity_version_update_payload.py new file mode 100644 index 0000000..28c6d1d --- /dev/null +++ b/test/test_apiv2_activity_version_update_payload.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_activity_version_update_payload import Apiv2ActivityVersionUpdatePayload # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2ActivityVersionUpdatePayload(unittest.TestCase): + """Apiv2ActivityVersionUpdatePayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2ActivityVersionUpdatePayload(self): + """Test Apiv2ActivityVersionUpdatePayload""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_activity_version_update_payload.Apiv2ActivityVersionUpdatePayload() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_reaction.py b/test/test_apiv2_reaction.py new file mode 100644 index 0000000..cc14adc --- /dev/null +++ b/test/test_apiv2_reaction.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_reaction import Apiv2Reaction # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2Reaction(unittest.TestCase): + """Apiv2Reaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2Reaction(self): + """Test Apiv2Reaction""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_reaction.Apiv2Reaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_reaction_type.py b/test/test_apiv2_reaction_type.py new file mode 100644 index 0000000..8611e61 --- /dev/null +++ b/test/test_apiv2_reaction_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_reaction_type import Apiv2ReactionType # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2ReactionType(unittest.TestCase): + """Apiv2ReactionType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2ReactionType(self): + """Test Apiv2ReactionType""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_reaction_type.Apiv2ReactionType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_row_status.py b/test/test_apiv2_row_status.py new file mode 100644 index 0000000..e00f088 --- /dev/null +++ b/test/test_apiv2_row_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_row_status import Apiv2RowStatus # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2RowStatus(unittest.TestCase): + """Apiv2RowStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2RowStatus(self): + """Test Apiv2RowStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_row_status.Apiv2RowStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_user_setting.py b/test/test_apiv2_user_setting.py new file mode 100644 index 0000000..9252aa2 --- /dev/null +++ b/test/test_apiv2_user_setting.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_user_setting import Apiv2UserSetting # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2UserSetting(unittest.TestCase): + """Apiv2UserSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2UserSetting(self): + """Test Apiv2UserSetting""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_user_setting.Apiv2UserSetting() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_webhook.py b/test/test_apiv2_webhook.py new file mode 100644 index 0000000..b04ac28 --- /dev/null +++ b/test/test_apiv2_webhook.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_webhook import Apiv2Webhook # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2Webhook(unittest.TestCase): + """Apiv2Webhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2Webhook(self): + """Test Apiv2Webhook""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_webhook.Apiv2Webhook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_workspace_general_setting.py b/test/test_apiv2_workspace_general_setting.py new file mode 100644 index 0000000..e1639b2 --- /dev/null +++ b/test/test_apiv2_workspace_general_setting.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_workspace_general_setting import Apiv2WorkspaceGeneralSetting # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2WorkspaceGeneralSetting(unittest.TestCase): + """Apiv2WorkspaceGeneralSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2WorkspaceGeneralSetting(self): + """Test Apiv2WorkspaceGeneralSetting""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_workspace_general_setting.Apiv2WorkspaceGeneralSetting() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apiv2_workspace_setting.py b/test/test_apiv2_workspace_setting.py new file mode 100644 index 0000000..92495b8 --- /dev/null +++ b/test/test_apiv2_workspace_setting.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.apiv2_workspace_setting import Apiv2WorkspaceSetting # noqa: E501 +from memos.rest import ApiException + + +class TestApiv2WorkspaceSetting(unittest.TestCase): + """Apiv2WorkspaceSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiv2WorkspaceSetting(self): + """Test Apiv2WorkspaceSetting""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.apiv2_workspace_setting.Apiv2WorkspaceSetting() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_service_api.py b/test/test_auth_service_api.py new file mode 100644 index 0000000..a2ebf6d --- /dev/null +++ b/test/test_auth_service_api.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.auth_service_api import AuthServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestAuthServiceApi(unittest.TestCase): + """AuthServiceApi unit test stubs""" + + def setUp(self): + self.api = AuthServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_auth_service_get_auth_status(self): + """Test case for auth_service_get_auth_status + + GetAuthStatus returns the current auth status of the user. # noqa: E501 + """ + pass + + def test_auth_service_sign_in(self): + """Test case for auth_service_sign_in + + SignIn signs in the user with the given username and password. # noqa: E501 + """ + pass + + def test_auth_service_sign_in_with_sso(self): + """Test case for auth_service_sign_in_with_sso + + SignInWithSSO signs in the user with the given SSO code. # noqa: E501 + """ + pass + + def test_auth_service_sign_out(self): + """Test case for auth_service_sign_out + + SignOut signs out the user. # noqa: E501 + """ + pass + + def test_auth_service_sign_up(self): + """Test case for auth_service_sign_up + + SignUp signs up the user with the given username and password. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_googlerpc_status.py b/test/test_googlerpc_status.py new file mode 100644 index 0000000..ed9fd01 --- /dev/null +++ b/test/test_googlerpc_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.googlerpc_status import GooglerpcStatus # noqa: E501 +from memos.rest import ApiException + + +class TestGooglerpcStatus(unittest.TestCase): + """GooglerpcStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGooglerpcStatus(self): + """Test GooglerpcStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.googlerpc_status.GooglerpcStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_service_api.py b/test/test_inbox_service_api.py new file mode 100644 index 0000000..e64179a --- /dev/null +++ b/test/test_inbox_service_api.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.inbox_service_api import InboxServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestInboxServiceApi(unittest.TestCase): + """InboxServiceApi unit test stubs""" + + def setUp(self): + self.api = InboxServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_inbox_service_delete_inbox(self): + """Test case for inbox_service_delete_inbox + + DeleteInbox deletes an inbox. # noqa: E501 + """ + pass + + def test_inbox_service_list_inboxes(self): + """Test case for inbox_service_list_inboxes + + ListInboxes lists inboxes for a user. # noqa: E501 + """ + pass + + def test_inbox_service_update_inbox(self): + """Test case for inbox_service_update_inbox + + UpdateInbox updates an inbox. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memo_service_api.py b/test/test_memo_service_api.py new file mode 100644 index 0000000..7b0eb26 --- /dev/null +++ b/test/test_memo_service_api.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.memo_service_api import MemoServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestMemoServiceApi(unittest.TestCase): + """MemoServiceApi unit test stubs""" + + def setUp(self): + self.api = MemoServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_memo_service_create_memo(self): + """Test case for memo_service_create_memo + + CreateMemo creates a memo. # noqa: E501 + """ + pass + + def test_memo_service_create_memo_comment(self): + """Test case for memo_service_create_memo_comment + + CreateMemoComment creates a comment for a memo. # noqa: E501 + """ + pass + + def test_memo_service_delete_memo(self): + """Test case for memo_service_delete_memo + + DeleteMemo deletes a memo by id. # noqa: E501 + """ + pass + + def test_memo_service_delete_memo_reaction(self): + """Test case for memo_service_delete_memo_reaction + + DeleteMemoReaction deletes a reaction for a memo. # noqa: E501 + """ + pass + + def test_memo_service_export_memos(self): + """Test case for memo_service_export_memos + + ExportMemos exports memos. # noqa: E501 + """ + pass + + def test_memo_service_get_memo(self): + """Test case for memo_service_get_memo + + GetMemo gets a memo by id. # noqa: E501 + """ + pass + + def test_memo_service_get_memo_by_name(self): + """Test case for memo_service_get_memo_by_name + + GetMemoByName gets a memo by name. # noqa: E501 + """ + pass + + def test_memo_service_get_user_memos_stats(self): + """Test case for memo_service_get_user_memos_stats + + GetUserMemosStats gets stats of memos for a user. # noqa: E501 + """ + pass + + def test_memo_service_list_memo_comments(self): + """Test case for memo_service_list_memo_comments + + ListMemoComments lists comments for a memo. # noqa: E501 + """ + pass + + def test_memo_service_list_memo_reactions(self): + """Test case for memo_service_list_memo_reactions + + ListMemoReactions lists reactions for a memo. # noqa: E501 + """ + pass + + def test_memo_service_list_memo_relations(self): + """Test case for memo_service_list_memo_relations + + ListMemoRelations lists relations for a memo. # noqa: E501 + """ + pass + + def test_memo_service_list_memo_resources(self): + """Test case for memo_service_list_memo_resources + + ListMemoResources lists resources for a memo. # noqa: E501 + """ + pass + + def test_memo_service_list_memos(self): + """Test case for memo_service_list_memos + + ListMemos lists memos with pagination and filter. # noqa: E501 + """ + pass + + def test_memo_service_set_memo_relations(self): + """Test case for memo_service_set_memo_relations + + SetMemoRelations sets relations for a memo. # noqa: E501 + """ + pass + + def test_memo_service_set_memo_resources(self): + """Test case for memo_service_set_memo_resources + + SetMemoResources sets resources for a memo. # noqa: E501 + """ + pass + + def test_memo_service_update_memo(self): + """Test case for memo_service_update_memo + + UpdateMemo updates a memo. # noqa: E501 + """ + pass + + def test_memo_service_upsert_memo_reaction(self): + """Test case for memo_service_upsert_memo_reaction + + UpsertMemoReaction upserts a reaction for a memo. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memo_service_set_memo_relations_body.py b/test/test_memo_service_set_memo_relations_body.py new file mode 100644 index 0000000..4edf361 --- /dev/null +++ b/test/test_memo_service_set_memo_relations_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.memo_service_set_memo_relations_body import MemoServiceSetMemoRelationsBody # noqa: E501 +from memos.rest import ApiException + + +class TestMemoServiceSetMemoRelationsBody(unittest.TestCase): + """MemoServiceSetMemoRelationsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMemoServiceSetMemoRelationsBody(self): + """Test MemoServiceSetMemoRelationsBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.memo_service_set_memo_relations_body.MemoServiceSetMemoRelationsBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memo_service_set_memo_resources_body.py b/test/test_memo_service_set_memo_resources_body.py new file mode 100644 index 0000000..6fef1d1 --- /dev/null +++ b/test/test_memo_service_set_memo_resources_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.memo_service_set_memo_resources_body import MemoServiceSetMemoResourcesBody # noqa: E501 +from memos.rest import ApiException + + +class TestMemoServiceSetMemoResourcesBody(unittest.TestCase): + """MemoServiceSetMemoResourcesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMemoServiceSetMemoResourcesBody(self): + """Test MemoServiceSetMemoResourcesBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.memo_service_set_memo_resources_body.MemoServiceSetMemoResourcesBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memos_memo_id_body.py b/test/test_memos_memo_id_body.py new file mode 100644 index 0000000..41a3fe5 --- /dev/null +++ b/test/test_memos_memo_id_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.memos_memo_id_body import MemosMemoIdBody # noqa: E501 +from memos.rest import ApiException + + +class TestMemosMemoIdBody(unittest.TestCase): + """MemosMemoIdBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMemosMemoIdBody(self): + """Test MemosMemoIdBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.memos_memo_id_body.MemosMemoIdBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_protobuf_any.py b/test/test_protobuf_any.py new file mode 100644 index 0000000..7849ecc --- /dev/null +++ b/test/test_protobuf_any.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.protobuf_any import ProtobufAny # noqa: E501 +from memos.rest import ApiException + + +class TestProtobufAny(unittest.TestCase): + """ProtobufAny unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProtobufAny(self): + """Test ProtobufAny""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.protobuf_any.ProtobufAny() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_service_api.py b/test/test_resource_service_api.py new file mode 100644 index 0000000..f7e3b57 --- /dev/null +++ b/test/test_resource_service_api.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.resource_service_api import ResourceServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestResourceServiceApi(unittest.TestCase): + """ResourceServiceApi unit test stubs""" + + def setUp(self): + self.api = ResourceServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_resource_service_create_resource(self): + """Test case for resource_service_create_resource + + CreateResource creates a new resource. # noqa: E501 + """ + pass + + def test_resource_service_delete_resource(self): + """Test case for resource_service_delete_resource + + DeleteResource deletes a resource by id. # noqa: E501 + """ + pass + + def test_resource_service_get_resource(self): + """Test case for resource_service_get_resource + + GetResource returns a resource by id. # noqa: E501 + """ + pass + + def test_resource_service_get_resource_by_name(self): + """Test case for resource_service_get_resource_by_name + + GetResourceByName returns a resource by name. # noqa: E501 + """ + pass + + def test_resource_service_list_resources(self): + """Test case for resource_service_list_resources + + ListResources lists all resources. # noqa: E501 + """ + pass + + def test_resource_service_update_resource(self): + """Test case for resource_service_update_resource + + UpdateResource updates a resource. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resources_resource_id_body.py b/test/test_resources_resource_id_body.py new file mode 100644 index 0000000..b85e00f --- /dev/null +++ b/test/test_resources_resource_id_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.resources_resource_id_body import ResourcesResourceIdBody # noqa: E501 +from memos.rest import ApiException + + +class TestResourcesResourceIdBody(unittest.TestCase): + """ResourcesResourceIdBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResourcesResourceIdBody(self): + """Test ResourcesResourceIdBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.resources_resource_id_body.ResourcesResourceIdBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_setting_is_the_setting_to_update_.py b/test/test_setting_is_the_setting_to_update_.py new file mode 100644 index 0000000..dfd61dd --- /dev/null +++ b/test/test_setting_is_the_setting_to_update_.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.setting_is_the_setting_to_update_ import SettingIsTheSettingToUpdate_ # noqa: E501 +from memos.rest import ApiException + + +class TestSettingIsTheSettingToUpdate_(unittest.TestCase): + """SettingIsTheSettingToUpdate_ unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSettingIsTheSettingToUpdate_(self): + """Test SettingIsTheSettingToUpdate_""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.setting_is_the_setting_to_update_.SettingIsTheSettingToUpdate_() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag_service_api.py b/test/test_tag_service_api.py new file mode 100644 index 0000000..bb44219 --- /dev/null +++ b/test/test_tag_service_api.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.tag_service_api import TagServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestTagServiceApi(unittest.TestCase): + """TagServiceApi unit test stubs""" + + def setUp(self): + self.api = TagServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_tag_service_batch_upsert_tag(self): + """Test case for tag_service_batch_upsert_tag + + BatchUpsertTag upserts multiple tags. # noqa: E501 + """ + pass + + def test_tag_service_delete_tag(self): + """Test case for tag_service_delete_tag + + DeleteTag deletes a tag. # noqa: E501 + """ + pass + + def test_tag_service_get_tag_suggestions(self): + """Test case for tag_service_get_tag_suggestions + + GetTagSuggestions gets tag suggestions from the user's memos. # noqa: E501 + """ + pass + + def test_tag_service_list_tags(self): + """Test case for tag_service_list_tags + + ListTags lists tags. # noqa: E501 + """ + pass + + def test_tag_service_rename_tag(self): + """Test case for tag_service_rename_tag + + RenameTag renames a tag. All related memos will be updated. # noqa: E501 + """ + pass + + def test_tag_service_upsert_tag(self): + """Test case for tag_service_upsert_tag + + UpsertTag upserts a tag. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_role.py b/test/test_user_role.py new file mode 100644 index 0000000..655aa72 --- /dev/null +++ b/test/test_user_role.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.user_role import UserRole # noqa: E501 +from memos.rest import ApiException + + +class TestUserRole(unittest.TestCase): + """UserRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserRole(self): + """Test UserRole""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.user_role.UserRole() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_service_api.py b/test/test_user_service_api.py new file mode 100644 index 0000000..34346c7 --- /dev/null +++ b/test/test_user_service_api.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.user_service_api import UserServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestUserServiceApi(unittest.TestCase): + """UserServiceApi unit test stubs""" + + def setUp(self): + self.api = UserServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_user_service_create_user(self): + """Test case for user_service_create_user + + CreateUser creates a new user. # noqa: E501 + """ + pass + + def test_user_service_create_user_access_token(self): + """Test case for user_service_create_user_access_token + + CreateUserAccessToken creates a new access token for a user. # noqa: E501 + """ + pass + + def test_user_service_delete_user(self): + """Test case for user_service_delete_user + + DeleteUser deletes a user. # noqa: E501 + """ + pass + + def test_user_service_delete_user_access_token(self): + """Test case for user_service_delete_user_access_token + + DeleteUserAccessToken deletes an access token for a user. # noqa: E501 + """ + pass + + def test_user_service_get_user(self): + """Test case for user_service_get_user + + GetUser gets a user by name. # noqa: E501 + """ + pass + + def test_user_service_get_user_setting(self): + """Test case for user_service_get_user_setting + + GetUserSetting gets the setting of a user. # noqa: E501 + """ + pass + + def test_user_service_list_user_access_tokens(self): + """Test case for user_service_list_user_access_tokens + + ListUserAccessTokens returns a list of access tokens for a user. # noqa: E501 + """ + pass + + def test_user_service_list_users(self): + """Test case for user_service_list_users + + ListUsers returns a list of users. # noqa: E501 + """ + pass + + def test_user_service_update_user(self): + """Test case for user_service_update_user + + UpdateUser updates a user. # noqa: E501 + """ + pass + + def test_user_service_update_user_setting(self): + """Test case for user_service_update_user_setting + + UpdateUserSetting updates the setting of a user. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_service_create_user_access_token_body.py b/test/test_user_service_create_user_access_token_body.py new file mode 100644 index 0000000..7043f6e --- /dev/null +++ b/test/test_user_service_create_user_access_token_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.user_service_create_user_access_token_body import UserServiceCreateUserAccessTokenBody # noqa: E501 +from memos.rest import ApiException + + +class TestUserServiceCreateUserAccessTokenBody(unittest.TestCase): + """UserServiceCreateUserAccessTokenBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserServiceCreateUserAccessTokenBody(self): + """Test UserServiceCreateUserAccessTokenBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.user_service_create_user_access_token_body.UserServiceCreateUserAccessTokenBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_activity.py b/test/test_v2_activity.py new file mode 100644 index 0000000..35a1e0a --- /dev/null +++ b/test/test_v2_activity.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_activity import V2Activity # noqa: E501 +from memos.rest import ApiException + + +class TestV2Activity(unittest.TestCase): + """V2Activity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Activity(self): + """Test V2Activity""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_activity.V2Activity() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_batch_upsert_tag_response.py b/test/test_v2_batch_upsert_tag_response.py new file mode 100644 index 0000000..d3d33b8 --- /dev/null +++ b/test/test_v2_batch_upsert_tag_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_batch_upsert_tag_response import V2BatchUpsertTagResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2BatchUpsertTagResponse(unittest.TestCase): + """V2BatchUpsertTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2BatchUpsertTagResponse(self): + """Test V2BatchUpsertTagResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_batch_upsert_tag_response.V2BatchUpsertTagResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_memo_comment_response.py b/test/test_v2_create_memo_comment_response.py new file mode 100644 index 0000000..da4ad1e --- /dev/null +++ b/test/test_v2_create_memo_comment_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_memo_comment_response import V2CreateMemoCommentResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateMemoCommentResponse(unittest.TestCase): + """V2CreateMemoCommentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateMemoCommentResponse(self): + """Test V2CreateMemoCommentResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_memo_comment_response.V2CreateMemoCommentResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_memo_request.py b/test/test_v2_create_memo_request.py new file mode 100644 index 0000000..a394da4 --- /dev/null +++ b/test/test_v2_create_memo_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_memo_request import V2CreateMemoRequest # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateMemoRequest(unittest.TestCase): + """V2CreateMemoRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateMemoRequest(self): + """Test V2CreateMemoRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_memo_request.V2CreateMemoRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_memo_response.py b/test/test_v2_create_memo_response.py new file mode 100644 index 0000000..17cae10 --- /dev/null +++ b/test/test_v2_create_memo_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_memo_response import V2CreateMemoResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateMemoResponse(unittest.TestCase): + """V2CreateMemoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateMemoResponse(self): + """Test V2CreateMemoResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_memo_response.V2CreateMemoResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_resource_response.py b/test/test_v2_create_resource_response.py new file mode 100644 index 0000000..53b00aa --- /dev/null +++ b/test/test_v2_create_resource_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_resource_response import V2CreateResourceResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateResourceResponse(unittest.TestCase): + """V2CreateResourceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateResourceResponse(self): + """Test V2CreateResourceResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_resource_response.V2CreateResourceResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_user_access_token_response.py b/test/test_v2_create_user_access_token_response.py new file mode 100644 index 0000000..5bb4d68 --- /dev/null +++ b/test/test_v2_create_user_access_token_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_user_access_token_response import V2CreateUserAccessTokenResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateUserAccessTokenResponse(unittest.TestCase): + """V2CreateUserAccessTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateUserAccessTokenResponse(self): + """Test V2CreateUserAccessTokenResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_user_access_token_response.V2CreateUserAccessTokenResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_user_response.py b/test/test_v2_create_user_response.py new file mode 100644 index 0000000..74a2b14 --- /dev/null +++ b/test/test_v2_create_user_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_user_response import V2CreateUserResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateUserResponse(unittest.TestCase): + """V2CreateUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateUserResponse(self): + """Test V2CreateUserResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_user_response.V2CreateUserResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_webhook_request.py b/test/test_v2_create_webhook_request.py new file mode 100644 index 0000000..86a7247 --- /dev/null +++ b/test/test_v2_create_webhook_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_webhook_request import V2CreateWebhookRequest # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateWebhookRequest(unittest.TestCase): + """V2CreateWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateWebhookRequest(self): + """Test V2CreateWebhookRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_webhook_request.V2CreateWebhookRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_create_webhook_response.py b/test/test_v2_create_webhook_response.py new file mode 100644 index 0000000..a84bf59 --- /dev/null +++ b/test/test_v2_create_webhook_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_create_webhook_response import V2CreateWebhookResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2CreateWebhookResponse(unittest.TestCase): + """V2CreateWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2CreateWebhookResponse(self): + """Test V2CreateWebhookResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_create_webhook_response.V2CreateWebhookResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_inbox_response.py b/test/test_v2_delete_inbox_response.py new file mode 100644 index 0000000..c3023fd --- /dev/null +++ b/test/test_v2_delete_inbox_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_inbox_response import V2DeleteInboxResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteInboxResponse(unittest.TestCase): + """V2DeleteInboxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteInboxResponse(self): + """Test V2DeleteInboxResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_inbox_response.V2DeleteInboxResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_memo_reaction_response.py b/test/test_v2_delete_memo_reaction_response.py new file mode 100644 index 0000000..2898228 --- /dev/null +++ b/test/test_v2_delete_memo_reaction_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_memo_reaction_response import V2DeleteMemoReactionResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteMemoReactionResponse(unittest.TestCase): + """V2DeleteMemoReactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteMemoReactionResponse(self): + """Test V2DeleteMemoReactionResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_memo_reaction_response.V2DeleteMemoReactionResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_memo_response.py b/test/test_v2_delete_memo_response.py new file mode 100644 index 0000000..2a9b3b8 --- /dev/null +++ b/test/test_v2_delete_memo_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_memo_response import V2DeleteMemoResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteMemoResponse(unittest.TestCase): + """V2DeleteMemoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteMemoResponse(self): + """Test V2DeleteMemoResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_memo_response.V2DeleteMemoResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_resource_response.py b/test/test_v2_delete_resource_response.py new file mode 100644 index 0000000..84a3162 --- /dev/null +++ b/test/test_v2_delete_resource_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_resource_response import V2DeleteResourceResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteResourceResponse(unittest.TestCase): + """V2DeleteResourceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteResourceResponse(self): + """Test V2DeleteResourceResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_resource_response.V2DeleteResourceResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_tag_response.py b/test/test_v2_delete_tag_response.py new file mode 100644 index 0000000..9e09228 --- /dev/null +++ b/test/test_v2_delete_tag_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_tag_response import V2DeleteTagResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteTagResponse(unittest.TestCase): + """V2DeleteTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteTagResponse(self): + """Test V2DeleteTagResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_tag_response.V2DeleteTagResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_user_access_token_response.py b/test/test_v2_delete_user_access_token_response.py new file mode 100644 index 0000000..33b2551 --- /dev/null +++ b/test/test_v2_delete_user_access_token_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_user_access_token_response import V2DeleteUserAccessTokenResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteUserAccessTokenResponse(unittest.TestCase): + """V2DeleteUserAccessTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteUserAccessTokenResponse(self): + """Test V2DeleteUserAccessTokenResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_user_access_token_response.V2DeleteUserAccessTokenResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_user_response.py b/test/test_v2_delete_user_response.py new file mode 100644 index 0000000..b900de2 --- /dev/null +++ b/test/test_v2_delete_user_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_user_response import V2DeleteUserResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteUserResponse(unittest.TestCase): + """V2DeleteUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteUserResponse(self): + """Test V2DeleteUserResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_user_response.V2DeleteUserResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_delete_webhook_response.py b/test/test_v2_delete_webhook_response.py new file mode 100644 index 0000000..e15cf95 --- /dev/null +++ b/test/test_v2_delete_webhook_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_delete_webhook_response import V2DeleteWebhookResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2DeleteWebhookResponse(unittest.TestCase): + """V2DeleteWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2DeleteWebhookResponse(self): + """Test V2DeleteWebhookResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_delete_webhook_response.V2DeleteWebhookResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_export_memos_response.py b/test/test_v2_export_memos_response.py new file mode 100644 index 0000000..7b86b5f --- /dev/null +++ b/test/test_v2_export_memos_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_export_memos_response import V2ExportMemosResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ExportMemosResponse(unittest.TestCase): + """V2ExportMemosResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ExportMemosResponse(self): + """Test V2ExportMemosResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_export_memos_response.V2ExportMemosResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_activity_response.py b/test/test_v2_get_activity_response.py new file mode 100644 index 0000000..fafe515 --- /dev/null +++ b/test/test_v2_get_activity_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_activity_response import V2GetActivityResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetActivityResponse(unittest.TestCase): + """V2GetActivityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetActivityResponse(self): + """Test V2GetActivityResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_activity_response.V2GetActivityResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_auth_status_response.py b/test/test_v2_get_auth_status_response.py new file mode 100644 index 0000000..8f99a9a --- /dev/null +++ b/test/test_v2_get_auth_status_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_auth_status_response import V2GetAuthStatusResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetAuthStatusResponse(unittest.TestCase): + """V2GetAuthStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetAuthStatusResponse(self): + """Test V2GetAuthStatusResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_auth_status_response.V2GetAuthStatusResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_memo_by_name_response.py b/test/test_v2_get_memo_by_name_response.py new file mode 100644 index 0000000..b5eedda --- /dev/null +++ b/test/test_v2_get_memo_by_name_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_memo_by_name_response import V2GetMemoByNameResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetMemoByNameResponse(unittest.TestCase): + """V2GetMemoByNameResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetMemoByNameResponse(self): + """Test V2GetMemoByNameResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_memo_by_name_response.V2GetMemoByNameResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_memo_response.py b/test/test_v2_get_memo_response.py new file mode 100644 index 0000000..17fc70c --- /dev/null +++ b/test/test_v2_get_memo_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_memo_response import V2GetMemoResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetMemoResponse(unittest.TestCase): + """V2GetMemoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetMemoResponse(self): + """Test V2GetMemoResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_memo_response.V2GetMemoResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_resource_by_name_response.py b/test/test_v2_get_resource_by_name_response.py new file mode 100644 index 0000000..1f6b44b --- /dev/null +++ b/test/test_v2_get_resource_by_name_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_resource_by_name_response import V2GetResourceByNameResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetResourceByNameResponse(unittest.TestCase): + """V2GetResourceByNameResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetResourceByNameResponse(self): + """Test V2GetResourceByNameResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_resource_by_name_response.V2GetResourceByNameResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_resource_response.py b/test/test_v2_get_resource_response.py new file mode 100644 index 0000000..276a90f --- /dev/null +++ b/test/test_v2_get_resource_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_resource_response import V2GetResourceResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetResourceResponse(unittest.TestCase): + """V2GetResourceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetResourceResponse(self): + """Test V2GetResourceResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_resource_response.V2GetResourceResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_tag_suggestions_response.py b/test/test_v2_get_tag_suggestions_response.py new file mode 100644 index 0000000..ce602a3 --- /dev/null +++ b/test/test_v2_get_tag_suggestions_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_tag_suggestions_response import V2GetTagSuggestionsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetTagSuggestionsResponse(unittest.TestCase): + """V2GetTagSuggestionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetTagSuggestionsResponse(self): + """Test V2GetTagSuggestionsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_tag_suggestions_response.V2GetTagSuggestionsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_user_memos_stats_response.py b/test/test_v2_get_user_memos_stats_response.py new file mode 100644 index 0000000..218851c --- /dev/null +++ b/test/test_v2_get_user_memos_stats_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_user_memos_stats_response import V2GetUserMemosStatsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetUserMemosStatsResponse(unittest.TestCase): + """V2GetUserMemosStatsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetUserMemosStatsResponse(self): + """Test V2GetUserMemosStatsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_user_memos_stats_response.V2GetUserMemosStatsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_user_response.py b/test/test_v2_get_user_response.py new file mode 100644 index 0000000..72f3931 --- /dev/null +++ b/test/test_v2_get_user_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_user_response import V2GetUserResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetUserResponse(unittest.TestCase): + """V2GetUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetUserResponse(self): + """Test V2GetUserResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_user_response.V2GetUserResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_user_setting_response.py b/test/test_v2_get_user_setting_response.py new file mode 100644 index 0000000..5ac64b1 --- /dev/null +++ b/test/test_v2_get_user_setting_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_user_setting_response import V2GetUserSettingResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetUserSettingResponse(unittest.TestCase): + """V2GetUserSettingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetUserSettingResponse(self): + """Test V2GetUserSettingResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_user_setting_response.V2GetUserSettingResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_webhook_response.py b/test/test_v2_get_webhook_response.py new file mode 100644 index 0000000..9ca99e1 --- /dev/null +++ b/test/test_v2_get_webhook_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_webhook_response import V2GetWebhookResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetWebhookResponse(unittest.TestCase): + """V2GetWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetWebhookResponse(self): + """Test V2GetWebhookResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_webhook_response.V2GetWebhookResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_workspace_profile_response.py b/test/test_v2_get_workspace_profile_response.py new file mode 100644 index 0000000..97b3611 --- /dev/null +++ b/test/test_v2_get_workspace_profile_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_workspace_profile_response import V2GetWorkspaceProfileResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetWorkspaceProfileResponse(unittest.TestCase): + """V2GetWorkspaceProfileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetWorkspaceProfileResponse(self): + """Test V2GetWorkspaceProfileResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_workspace_profile_response.V2GetWorkspaceProfileResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_get_workspace_setting_response.py b/test/test_v2_get_workspace_setting_response.py new file mode 100644 index 0000000..31a0350 --- /dev/null +++ b/test/test_v2_get_workspace_setting_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_get_workspace_setting_response import V2GetWorkspaceSettingResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2GetWorkspaceSettingResponse(unittest.TestCase): + """V2GetWorkspaceSettingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2GetWorkspaceSettingResponse(self): + """Test V2GetWorkspaceSettingResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_get_workspace_setting_response.V2GetWorkspaceSettingResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_inbox.py b/test/test_v2_inbox.py new file mode 100644 index 0000000..fd01d0a --- /dev/null +++ b/test/test_v2_inbox.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_inbox import V2Inbox # noqa: E501 +from memos.rest import ApiException + + +class TestV2Inbox(unittest.TestCase): + """V2Inbox unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Inbox(self): + """Test V2Inbox""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_inbox.V2Inbox() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_inbox_name_body.py b/test/test_v2_inbox_name_body.py new file mode 100644 index 0000000..e68df55 --- /dev/null +++ b/test/test_v2_inbox_name_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_inbox_name_body import V2InboxNameBody # noqa: E501 +from memos.rest import ApiException + + +class TestV2InboxNameBody(unittest.TestCase): + """V2InboxNameBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2InboxNameBody(self): + """Test V2InboxNameBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_inbox_name_body.V2InboxNameBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_inbox_status.py b/test/test_v2_inbox_status.py new file mode 100644 index 0000000..5daa4fc --- /dev/null +++ b/test/test_v2_inbox_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_inbox_status import V2InboxStatus # noqa: E501 +from memos.rest import ApiException + + +class TestV2InboxStatus(unittest.TestCase): + """V2InboxStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2InboxStatus(self): + """Test V2InboxStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_inbox_status.V2InboxStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_inbox_type.py b/test/test_v2_inbox_type.py new file mode 100644 index 0000000..3235c60 --- /dev/null +++ b/test/test_v2_inbox_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_inbox_type import V2InboxType # noqa: E501 +from memos.rest import ApiException + + +class TestV2InboxType(unittest.TestCase): + """V2InboxType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2InboxType(self): + """Test V2InboxType""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_inbox_type.V2InboxType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_inboxes_response.py b/test/test_v2_list_inboxes_response.py new file mode 100644 index 0000000..5546434 --- /dev/null +++ b/test/test_v2_list_inboxes_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_inboxes_response import V2ListInboxesResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListInboxesResponse(unittest.TestCase): + """V2ListInboxesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListInboxesResponse(self): + """Test V2ListInboxesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_inboxes_response.V2ListInboxesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_memo_comments_response.py b/test/test_v2_list_memo_comments_response.py new file mode 100644 index 0000000..dfdf8b3 --- /dev/null +++ b/test/test_v2_list_memo_comments_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_memo_comments_response import V2ListMemoCommentsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListMemoCommentsResponse(unittest.TestCase): + """V2ListMemoCommentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListMemoCommentsResponse(self): + """Test V2ListMemoCommentsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_memo_comments_response.V2ListMemoCommentsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_memo_reactions_response.py b/test/test_v2_list_memo_reactions_response.py new file mode 100644 index 0000000..643fec2 --- /dev/null +++ b/test/test_v2_list_memo_reactions_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_memo_reactions_response import V2ListMemoReactionsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListMemoReactionsResponse(unittest.TestCase): + """V2ListMemoReactionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListMemoReactionsResponse(self): + """Test V2ListMemoReactionsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_memo_reactions_response.V2ListMemoReactionsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_memo_relations_response.py b/test/test_v2_list_memo_relations_response.py new file mode 100644 index 0000000..55ca2a2 --- /dev/null +++ b/test/test_v2_list_memo_relations_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_memo_relations_response import V2ListMemoRelationsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListMemoRelationsResponse(unittest.TestCase): + """V2ListMemoRelationsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListMemoRelationsResponse(self): + """Test V2ListMemoRelationsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_memo_relations_response.V2ListMemoRelationsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_memo_resources_response.py b/test/test_v2_list_memo_resources_response.py new file mode 100644 index 0000000..bc32ab4 --- /dev/null +++ b/test/test_v2_list_memo_resources_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_memo_resources_response import V2ListMemoResourcesResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListMemoResourcesResponse(unittest.TestCase): + """V2ListMemoResourcesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListMemoResourcesResponse(self): + """Test V2ListMemoResourcesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_memo_resources_response.V2ListMemoResourcesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_memos_response.py b/test/test_v2_list_memos_response.py new file mode 100644 index 0000000..ced89f2 --- /dev/null +++ b/test/test_v2_list_memos_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_memos_response import V2ListMemosResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListMemosResponse(unittest.TestCase): + """V2ListMemosResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListMemosResponse(self): + """Test V2ListMemosResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_memos_response.V2ListMemosResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_resources_response.py b/test/test_v2_list_resources_response.py new file mode 100644 index 0000000..fc118ce --- /dev/null +++ b/test/test_v2_list_resources_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_resources_response import V2ListResourcesResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListResourcesResponse(unittest.TestCase): + """V2ListResourcesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListResourcesResponse(self): + """Test V2ListResourcesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_resources_response.V2ListResourcesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_tags_response.py b/test/test_v2_list_tags_response.py new file mode 100644 index 0000000..fbfade4 --- /dev/null +++ b/test/test_v2_list_tags_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_tags_response import V2ListTagsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListTagsResponse(unittest.TestCase): + """V2ListTagsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListTagsResponse(self): + """Test V2ListTagsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_tags_response.V2ListTagsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_user_access_tokens_response.py b/test/test_v2_list_user_access_tokens_response.py new file mode 100644 index 0000000..bcc8f01 --- /dev/null +++ b/test/test_v2_list_user_access_tokens_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_user_access_tokens_response import V2ListUserAccessTokensResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListUserAccessTokensResponse(unittest.TestCase): + """V2ListUserAccessTokensResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListUserAccessTokensResponse(self): + """Test V2ListUserAccessTokensResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_user_access_tokens_response.V2ListUserAccessTokensResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_users_response.py b/test/test_v2_list_users_response.py new file mode 100644 index 0000000..d1ef38e --- /dev/null +++ b/test/test_v2_list_users_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_users_response import V2ListUsersResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListUsersResponse(unittest.TestCase): + """V2ListUsersResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListUsersResponse(self): + """Test V2ListUsersResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_users_response.V2ListUsersResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_list_webhooks_response.py b/test/test_v2_list_webhooks_response.py new file mode 100644 index 0000000..85dcb40 --- /dev/null +++ b/test/test_v2_list_webhooks_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_list_webhooks_response import V2ListWebhooksResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2ListWebhooksResponse(unittest.TestCase): + """V2ListWebhooksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2ListWebhooksResponse(self): + """Test V2ListWebhooksResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_list_webhooks_response.V2ListWebhooksResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_memo.py b/test/test_v2_memo.py new file mode 100644 index 0000000..1b1d4d6 --- /dev/null +++ b/test/test_v2_memo.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_memo import V2Memo # noqa: E501 +from memos.rest import ApiException + + +class TestV2Memo(unittest.TestCase): + """V2Memo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Memo(self): + """Test V2Memo""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_memo.V2Memo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_memo_relation.py b/test/test_v2_memo_relation.py new file mode 100644 index 0000000..16ad6c1 --- /dev/null +++ b/test/test_v2_memo_relation.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_memo_relation import V2MemoRelation # noqa: E501 +from memos.rest import ApiException + + +class TestV2MemoRelation(unittest.TestCase): + """V2MemoRelation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2MemoRelation(self): + """Test V2MemoRelation""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_memo_relation.V2MemoRelation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_memo_relation_type.py b/test/test_v2_memo_relation_type.py new file mode 100644 index 0000000..c750d7a --- /dev/null +++ b/test/test_v2_memo_relation_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_memo_relation_type import V2MemoRelationType # noqa: E501 +from memos.rest import ApiException + + +class TestV2MemoRelationType(unittest.TestCase): + """V2MemoRelationType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2MemoRelationType(self): + """Test V2MemoRelationType""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_memo_relation_type.V2MemoRelationType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_rename_tag_response.py b/test/test_v2_rename_tag_response.py new file mode 100644 index 0000000..53abe76 --- /dev/null +++ b/test/test_v2_rename_tag_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_rename_tag_response import V2RenameTagResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2RenameTagResponse(unittest.TestCase): + """V2RenameTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2RenameTagResponse(self): + """Test V2RenameTagResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_rename_tag_response.V2RenameTagResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_resource.py b/test/test_v2_resource.py new file mode 100644 index 0000000..7eada84 --- /dev/null +++ b/test/test_v2_resource.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_resource import V2Resource # noqa: E501 +from memos.rest import ApiException + + +class TestV2Resource(unittest.TestCase): + """V2Resource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Resource(self): + """Test V2Resource""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_resource.V2Resource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_set_memo_relations_response.py b/test/test_v2_set_memo_relations_response.py new file mode 100644 index 0000000..48e446f --- /dev/null +++ b/test/test_v2_set_memo_relations_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_set_memo_relations_response import V2SetMemoRelationsResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SetMemoRelationsResponse(unittest.TestCase): + """V2SetMemoRelationsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SetMemoRelationsResponse(self): + """Test V2SetMemoRelationsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_set_memo_relations_response.V2SetMemoRelationsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_set_memo_resources_response.py b/test/test_v2_set_memo_resources_response.py new file mode 100644 index 0000000..4418b3e --- /dev/null +++ b/test/test_v2_set_memo_resources_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_set_memo_resources_response import V2SetMemoResourcesResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SetMemoResourcesResponse(unittest.TestCase): + """V2SetMemoResourcesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SetMemoResourcesResponse(self): + """Test V2SetMemoResourcesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_set_memo_resources_response.V2SetMemoResourcesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_set_workspace_setting_response.py b/test/test_v2_set_workspace_setting_response.py new file mode 100644 index 0000000..fd2b7f1 --- /dev/null +++ b/test/test_v2_set_workspace_setting_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_set_workspace_setting_response import V2SetWorkspaceSettingResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SetWorkspaceSettingResponse(unittest.TestCase): + """V2SetWorkspaceSettingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SetWorkspaceSettingResponse(self): + """Test V2SetWorkspaceSettingResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_set_workspace_setting_response.V2SetWorkspaceSettingResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_setting_name_body.py b/test/test_v2_setting_name_body.py new file mode 100644 index 0000000..e9bd855 --- /dev/null +++ b/test/test_v2_setting_name_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_setting_name_body import V2SettingNameBody # noqa: E501 +from memos.rest import ApiException + + +class TestV2SettingNameBody(unittest.TestCase): + """V2SettingNameBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SettingNameBody(self): + """Test V2SettingNameBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_setting_name_body.V2SettingNameBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_sign_in_response.py b/test/test_v2_sign_in_response.py new file mode 100644 index 0000000..49749fa --- /dev/null +++ b/test/test_v2_sign_in_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_sign_in_response import V2SignInResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SignInResponse(unittest.TestCase): + """V2SignInResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SignInResponse(self): + """Test V2SignInResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_sign_in_response.V2SignInResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_sign_in_with_sso_response.py b/test/test_v2_sign_in_with_sso_response.py new file mode 100644 index 0000000..a5077b2 --- /dev/null +++ b/test/test_v2_sign_in_with_sso_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_sign_in_with_sso_response import V2SignInWithSSOResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SignInWithSSOResponse(unittest.TestCase): + """V2SignInWithSSOResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SignInWithSSOResponse(self): + """Test V2SignInWithSSOResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_sign_in_with_sso_response.V2SignInWithSSOResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_sign_out_response.py b/test/test_v2_sign_out_response.py new file mode 100644 index 0000000..ff2bdf7 --- /dev/null +++ b/test/test_v2_sign_out_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_sign_out_response import V2SignOutResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SignOutResponse(unittest.TestCase): + """V2SignOutResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SignOutResponse(self): + """Test V2SignOutResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_sign_out_response.V2SignOutResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_sign_up_response.py b/test/test_v2_sign_up_response.py new file mode 100644 index 0000000..10edaeb --- /dev/null +++ b/test/test_v2_sign_up_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_sign_up_response import V2SignUpResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2SignUpResponse(unittest.TestCase): + """V2SignUpResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2SignUpResponse(self): + """Test V2SignUpResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_sign_up_response.V2SignUpResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_tag.py b/test/test_v2_tag.py new file mode 100644 index 0000000..a0139a4 --- /dev/null +++ b/test/test_v2_tag.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_tag import V2Tag # noqa: E501 +from memos.rest import ApiException + + +class TestV2Tag(unittest.TestCase): + """V2Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Tag(self): + """Test V2Tag""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_tag.V2Tag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_inbox_response.py b/test/test_v2_update_inbox_response.py new file mode 100644 index 0000000..19c6a6d --- /dev/null +++ b/test/test_v2_update_inbox_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_inbox_response import V2UpdateInboxResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateInboxResponse(unittest.TestCase): + """V2UpdateInboxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateInboxResponse(self): + """Test V2UpdateInboxResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_inbox_response.V2UpdateInboxResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_memo_response.py b/test/test_v2_update_memo_response.py new file mode 100644 index 0000000..378faa3 --- /dev/null +++ b/test/test_v2_update_memo_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_memo_response import V2UpdateMemoResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateMemoResponse(unittest.TestCase): + """V2UpdateMemoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateMemoResponse(self): + """Test V2UpdateMemoResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_memo_response.V2UpdateMemoResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_resource_response.py b/test/test_v2_update_resource_response.py new file mode 100644 index 0000000..1a6c8ef --- /dev/null +++ b/test/test_v2_update_resource_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_resource_response import V2UpdateResourceResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateResourceResponse(unittest.TestCase): + """V2UpdateResourceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateResourceResponse(self): + """Test V2UpdateResourceResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_resource_response.V2UpdateResourceResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_user_response.py b/test/test_v2_update_user_response.py new file mode 100644 index 0000000..83f5ac1 --- /dev/null +++ b/test/test_v2_update_user_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_user_response import V2UpdateUserResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateUserResponse(unittest.TestCase): + """V2UpdateUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateUserResponse(self): + """Test V2UpdateUserResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_user_response.V2UpdateUserResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_user_setting_response.py b/test/test_v2_update_user_setting_response.py new file mode 100644 index 0000000..e0c82fa --- /dev/null +++ b/test/test_v2_update_user_setting_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_user_setting_response import V2UpdateUserSettingResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateUserSettingResponse(unittest.TestCase): + """V2UpdateUserSettingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateUserSettingResponse(self): + """Test V2UpdateUserSettingResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_user_setting_response.V2UpdateUserSettingResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_update_webhook_response.py b/test/test_v2_update_webhook_response.py new file mode 100644 index 0000000..8b724ca --- /dev/null +++ b/test/test_v2_update_webhook_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_update_webhook_response import V2UpdateWebhookResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpdateWebhookResponse(unittest.TestCase): + """V2UpdateWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpdateWebhookResponse(self): + """Test V2UpdateWebhookResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_update_webhook_response.V2UpdateWebhookResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_upsert_memo_reaction_response.py b/test/test_v2_upsert_memo_reaction_response.py new file mode 100644 index 0000000..28429ad --- /dev/null +++ b/test/test_v2_upsert_memo_reaction_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_upsert_memo_reaction_response import V2UpsertMemoReactionResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpsertMemoReactionResponse(unittest.TestCase): + """V2UpsertMemoReactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpsertMemoReactionResponse(self): + """Test V2UpsertMemoReactionResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_upsert_memo_reaction_response.V2UpsertMemoReactionResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_upsert_tag_request.py b/test/test_v2_upsert_tag_request.py new file mode 100644 index 0000000..d5bcee4 --- /dev/null +++ b/test/test_v2_upsert_tag_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_upsert_tag_request import V2UpsertTagRequest # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpsertTagRequest(unittest.TestCase): + """V2UpsertTagRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpsertTagRequest(self): + """Test V2UpsertTagRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_upsert_tag_request.V2UpsertTagRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_upsert_tag_response.py b/test/test_v2_upsert_tag_response.py new file mode 100644 index 0000000..d01948c --- /dev/null +++ b/test/test_v2_upsert_tag_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_upsert_tag_response import V2UpsertTagResponse # noqa: E501 +from memos.rest import ApiException + + +class TestV2UpsertTagResponse(unittest.TestCase): + """V2UpsertTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UpsertTagResponse(self): + """Test V2UpsertTagResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_upsert_tag_response.V2UpsertTagResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_user.py b/test/test_v2_user.py new file mode 100644 index 0000000..3a642cf --- /dev/null +++ b/test/test_v2_user.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_user import V2User # noqa: E501 +from memos.rest import ApiException + + +class TestV2User(unittest.TestCase): + """V2User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2User(self): + """Test V2User""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_user.V2User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_user_access_token.py b/test/test_v2_user_access_token.py new file mode 100644 index 0000000..c80e24d --- /dev/null +++ b/test/test_v2_user_access_token.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_user_access_token import V2UserAccessToken # noqa: E501 +from memos.rest import ApiException + + +class TestV2UserAccessToken(unittest.TestCase): + """V2UserAccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UserAccessToken(self): + """Test V2UserAccessToken""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_user_access_token.V2UserAccessToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_user_name_body.py b/test/test_v2_user_name_body.py new file mode 100644 index 0000000..33a6a5f --- /dev/null +++ b/test/test_v2_user_name_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_user_name_body import V2UserNameBody # noqa: E501 +from memos.rest import ApiException + + +class TestV2UserNameBody(unittest.TestCase): + """V2UserNameBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2UserNameBody(self): + """Test V2UserNameBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_user_name_body.V2UserNameBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_visibility.py b/test/test_v2_visibility.py new file mode 100644 index 0000000..a371bbb --- /dev/null +++ b/test/test_v2_visibility.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_visibility import V2Visibility # noqa: E501 +from memos.rest import ApiException + + +class TestV2Visibility(unittest.TestCase): + """V2Visibility unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2Visibility(self): + """Test V2Visibility""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_visibility.V2Visibility() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v2_workspace_profile.py b/test/test_v2_workspace_profile.py new file mode 100644 index 0000000..1082491 --- /dev/null +++ b/test/test_v2_workspace_profile.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.v2_workspace_profile import V2WorkspaceProfile # noqa: E501 +from memos.rest import ApiException + + +class TestV2WorkspaceProfile(unittest.TestCase): + """V2WorkspaceProfile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV2WorkspaceProfile(self): + """Test V2WorkspaceProfile""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.v2_workspace_profile.V2WorkspaceProfile() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_service_api.py b/test/test_webhook_service_api.py new file mode 100644 index 0000000..8cbdf27 --- /dev/null +++ b/test/test_webhook_service_api.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.webhook_service_api import WebhookServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestWebhookServiceApi(unittest.TestCase): + """WebhookServiceApi unit test stubs""" + + def setUp(self): + self.api = WebhookServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_webhook_service_create_webhook(self): + """Test case for webhook_service_create_webhook + + CreateWebhook creates a new webhook. # noqa: E501 + """ + pass + + def test_webhook_service_delete_webhook(self): + """Test case for webhook_service_delete_webhook + + DeleteWebhook deletes a webhook by id. # noqa: E501 + """ + pass + + def test_webhook_service_get_webhook(self): + """Test case for webhook_service_get_webhook + + GetWebhook returns a webhook by id. # noqa: E501 + """ + pass + + def test_webhook_service_list_webhooks(self): + """Test case for webhook_service_list_webhooks + + ListWebhooks returns a list of webhooks. # noqa: E501 + """ + pass + + def test_webhook_service_update_webhook(self): + """Test case for webhook_service_update_webhook + + UpdateWebhook updates a webhook. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhooks_webhook_id_body.py b/test/test_webhooks_webhook_id_body.py new file mode 100644 index 0000000..56c69b5 --- /dev/null +++ b/test/test_webhooks_webhook_id_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.models.webhooks_webhook_id_body import WebhooksWebhookIdBody # noqa: E501 +from memos.rest import ApiException + + +class TestWebhooksWebhookIdBody(unittest.TestCase): + """WebhooksWebhookIdBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhooksWebhookIdBody(self): + """Test WebhooksWebhookIdBody""" + # FIXME: construct object with mandatory attributes with example values + # model = memos.models.webhooks_webhook_id_body.WebhooksWebhookIdBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_workspace_service_api.py b/test/test_workspace_service_api.py new file mode 100644 index 0000000..ff5df3a --- /dev/null +++ b/test/test_workspace_service_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.workspace_service_api import WorkspaceServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestWorkspaceServiceApi(unittest.TestCase): + """WorkspaceServiceApi unit test stubs""" + + def setUp(self): + self.api = WorkspaceServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_workspace_service_get_workspace_profile(self): + """Test case for workspace_service_get_workspace_profile + + GetWorkspaceProfile returns the workspace profile. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_workspace_setting_service_api.py b/test/test_workspace_setting_service_api.py new file mode 100644 index 0000000..8cebc2f --- /dev/null +++ b/test/test_workspace_setting_service_api.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + api/v2/activity_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import memos +from memos.api.workspace_setting_service_api import WorkspaceSettingServiceApi # noqa: E501 +from memos.rest import ApiException + + +class TestWorkspaceSettingServiceApi(unittest.TestCase): + """WorkspaceSettingServiceApi unit test stubs""" + + def setUp(self): + self.api = WorkspaceSettingServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_workspace_setting_service_get_workspace_setting(self): + """Test case for workspace_setting_service_get_workspace_setting + + GetWorkspaceSetting returns the setting by name. # noqa: E501 + """ + pass + + def test_workspace_setting_service_set_workspace_setting(self): + """Test case for workspace_setting_service_set_workspace_setting + + SetWorkspaceSetting updates the setting. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..a310bec --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + []